Interface AudioIndexOptions

Options for indexing an audio file into the vector store.

The audio is transcribed via an STT provider, then the transcript is embedded and stored alongside the original audio reference.

Example

const result = await indexer.indexAudio({
audio: fs.readFileSync('./recording.wav'),
metadata: { source: 'meeting', duration: 3600 },
language: 'en',
});
interface AudioIndexOptions {
    audio: Buffer<ArrayBufferLike>;
    metadata?: Record<string, unknown>;
    collection?: string;
    language?: string;
}

Properties

audio: Buffer<ArrayBufferLike>

Audio data as a raw Buffer (WAV, MP3, OGG, etc.). The format must be supported by the configured STT provider.

metadata?: Record<string, unknown>

Optional metadata to attach to the indexed document. Stored alongside the embedding for filtering during search.

collection?: string

Vector store collection to index into.

Default

'multimodal'
language?: string

BCP-47 language hint for the STT provider (e.g. 'en', 'es', 'ja'). Improves transcription accuracy for non-English audio.