/** * AudioDiarization — speaker diarization via the server's * /v1/audio/diarizations route. * * The browser SDK is server-route-only; there is no local C-ABI native * execution. This facade POSTs PCM-f32 audio bytes (as base64) to the * hosted native backend (pyannote pipeline) and returns typed speaker * segments. * * Python reference: octomil-python/octomil/audio/diarization.py * Route: POST /v1/audio/diarizations (octomil-python/octomil/serve/app.py:1488) * * Request body: * { audio_pcm_f32_base64: string, sample_rate_hz: number, deadline_ms?: number } * * Response body: * { object: "audio.diarization", sample_rate_hz: number, * segments: DiarizationSegment[] } */ /** A single speaker-attributed audio segment. */ export interface DiarizationSegment { /** Segment start in milliseconds from clip start. */ startMs: number; /** Segment end in milliseconds from clip start. */ endMs: number; /** * Numeric speaker identifier assigned by the diarization model. * IDs are local to the clip (0, 1, 2, …); they are NOT persistent * across separate calls. */ speakerId: number; /** * Human-readable speaker label (e.g. "SPEAKER_00"). May be an * empty string if the server backend did not emit one. */ speakerLabel: string; } export interface DiarizationCreateRequest { /** * Raw mono PCM-f32 audio as ArrayBuffer / Uint8Array. * Bytes must be float32-LE. */ audioBytes: ArrayBuffer | Uint8Array; /** Sample rate of the audio, in Hz (e.g. 16000). */ sampleRateHz: number; /** Per-request deadline in milliseconds. Defaults to 300 000 server-side. */ deadlineMs?: number; } export interface DiarizationCreateResponse { readonly object: "audio.diarization"; readonly sampleRateHz: number; readonly segments: DiarizationSegment[]; } export declare class AudioDiarization { private readonly serverUrl; private readonly apiKey; constructor(serverUrl: string, apiKey: string); /** * Diarize an audio clip — assign speaker identities to time segments. * * Returns ordered speaker segments covering the full clip. The same * speaker_id value indicates the same speaker within this call; IDs are * not stable across separate calls. */ create(request: DiarizationCreateRequest): Promise; } //# sourceMappingURL=audio-diarization.d.ts.map