for first push

This commit is contained in:
2026-04-29 16:29:03 -04:00
parent 218de3b03b
commit 509259bcf2
19 changed files with 1911 additions and 2 deletions

View File

@@ -82,3 +82,62 @@ export interface AlertInput {
channel: AlertChannel;
dedupKey: string;
}
export const AnalysisJobStatus = {
PENDING: "PENDING",
RUNNING: "RUNNING",
COMPLETED: "COMPLETED",
FAILED: "FAILED",
} as const;
export type AnalysisJobStatus = (typeof AnalysisJobStatus)[keyof typeof AnalysisJobStatus];
export const AnalysisType = {
SYNTHETIC_DETECTION: "SYNTHETIC_DETECTION",
VOICE_MATCH: "VOICE_MATCH",
BATCH: "BATCH",
} as const;
export type AnalysisType = (typeof AnalysisType)[keyof typeof AnalysisType];
export const DetectionVerdict = {
NATURAL: "NATURAL",
SYNTHETIC: "SYNTHETIC",
UNCERTAIN: "UNCERTAIN",
} as const;
export type DetectionVerdict = (typeof DetectionVerdict)[keyof typeof DetectionVerdict];
export interface VoiceEnrollmentInput {
label: string;
audioBuffer: Buffer;
sampleRate?: number;
}
export interface AnalyzeAudioInput {
audioBuffer: Buffer;
sampleRate?: number;
analysisType?: AnalysisType;
}
export interface BatchAnalyzeInput {
audioBuffers: Array<{ name: string; buffer: Buffer; sampleRate?: number }>;
analysisType?: AnalysisType;
}
export interface AnalysisResultOutput {
jobId: string;
syntheticScore: number;
verdict: DetectionVerdict;
confidence: number;
matchedEnrollmentId?: string;
matchedSimilarity?: number;
processingTimeMs: number;
modelVersion?: string;
}
export interface VoiceEnrollmentOutput {
id: string;
label: string;
embeddingDim: number;
sampleRate: number;
durationSec?: number;
createdAt: Date;
}