Streaming Transcription
POST/v1/models/transcribe/stream
Perform streaming transcription of an uploaded audio file, with optional French translation.
What does this endpoint do?
- Transcribes audio content into text in real-time using Bambara models.
- Optionally translates the transcribed text into French if
translate_to_frenchis set toTrue.
Behavior Notes:
- If
translate_to_french=False(default):- Each streamed response represents a chunk of the transcribed text.
- If
translate_to_french=True:- Each streamed response represents the entire transcription up to that point, translated into French.
- This is because translation requires full context for accurate results.
Headers:
x-api-key: Your API key for authentication.
Parameters:
file(UploadFile): The audio file to transcribe.translate_to_french(bool): Whether to translate the transcription into French. Defaults toFalse.
Example Response (Chunk Mode - translate_to_french=False):
{"text": "Aw ni ce", "start": 0.0, "end": 0.2}
{"text": "I ka kene wa?", "start": 0.2, "end": 0.4}
Example Response (Full Text Mode - translate_to_french=True):
{"text": "Bonjour, comment ça va?"}
Caution:
- Translation introduces latency because it requires the full transcription context for accuracy. Expect longer delays when
translate_to_french=True.
Returns: StreamingResponse: A streaming JSON response containing transcription and optional translation.
Request
Responses
- 200
- 422
Successful Response
Validation Error