Minimal interface for a speech-to-text provider.
This is kept intentionally narrow to avoid coupling the multimodal indexer to a specific STT service. Any service that can transcribe audio buffers satisfies this contract.
const sttProvider: ISpeechToTextProvider = { transcribe: async (audio, language) => { const response = await openai.audio.transcriptions.create({ model: 'whisper-1', file: audio, language, }); return response.text; },}; Copy
const sttProvider: ISpeechToTextProvider = { transcribe: async (audio, language) => { const response = await openai.audio.transcriptions.create({ model: 'whisper-1', file: audio, language, }); return response.text; },};
Transcribe audio data to text.
Raw audio data as a Buffer.
Optional
Optional BCP-47 language code hint.
The transcribed text.
Minimal interface for a speech-to-text provider.
This is kept intentionally narrow to avoid coupling the multimodal indexer to a specific STT service. Any service that can transcribe audio buffers satisfies this contract.
Example