FRE-5006: VoicePrint quality improvements
- P2-1: Consolidate mock ML logic to Python canonical source - P2-2: Fix weak hashes with SHA-256 - P2-3: Parallelize batch processing with Promise.allSettled() - P2-4: Add DI pattern support to services - P2-5: Add structured logging utility - P3-2: Persist batch jobId for result retrieval Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -52,6 +52,25 @@ enum UserRole {
|
||||
support
|
||||
}
|
||||
|
||||
enum DetectionVerdict {
|
||||
NATURAL
|
||||
SYNTHETIC
|
||||
UNCERTAIN
|
||||
}
|
||||
|
||||
enum AnalysisType {
|
||||
SYNTHETIC_DETECTION
|
||||
VOICE_MATCH
|
||||
BATCH
|
||||
}
|
||||
|
||||
enum AnalysisJobStatus {
|
||||
PENDING
|
||||
RUNNING
|
||||
COMPLETED
|
||||
FAILED
|
||||
}
|
||||
|
||||
model Account {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
@@ -337,6 +356,44 @@ model VoiceAnalysis {
|
||||
@@index([audioHash])
|
||||
}
|
||||
|
||||
model AnalysisJob {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
analysisType AnalysisType
|
||||
audioFilePath String
|
||||
status AnalysisJobStatus
|
||||
errorMessage String?
|
||||
completedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
result AnalysisResult?
|
||||
|
||||
@@index([userId])
|
||||
@@index([status])
|
||||
@@index([createdAt])
|
||||
}
|
||||
|
||||
model AnalysisResult {
|
||||
id String @id @default(uuid())
|
||||
analysisJobId String
|
||||
syntheticScore Float
|
||||
verdict DetectionVerdict
|
||||
confidence Float
|
||||
processingTimeMs Int
|
||||
matchedEnrollmentId String?
|
||||
matchedSimilarity Float?
|
||||
modelVersion String?
|
||||
|
||||
analysisJob AnalysisJob @relation(fields: [analysisJobId], references: [id])
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([analysisJobId])
|
||||
@@index([syntheticScore])
|
||||
@@index([verdict])
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// SpamShield Models (Spam Detection)
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user