Speech to Text
Upload an audio file and get the transcription text.
Upload an audio file for transcription. Supports various audio formats including MP3, WAV, OGG, M4A, and AAC.
Limitations:
- Maximum audio duration: Files longer than 10 minutes will be trimmed
- Supported formats: MP3, WAV, OGG, M4A, AAC
- Large files are supported but only first 10 minutes will be transcribed
Note:
For files larger than 100MB, please use chunked upload or consider splitting the audio file.
Args:
request: The FastAPI request object. audio: The uploaded audio file. language: Target language for transcription. Defaults to Luganda. adapter: Language adapter to use. Defaults to Luganda. recognise_speakers: Enable speaker diarization. Defaults to False. whisper: Use Whisper model for transcription. Defaults to False. db: Database session. current_user: The authenticated user. service: The STT service instance.
Returns:
STTTranscript containing the transcription results.
Raises:
ValidationError: If audio file validation fails. BadRequestError: If audio processing fails. ExternalServiceError: If transcription service fails.
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Audio file to transcribe
Supported languages for Speech-to-Text transcription.
This enum defines the language codes supported by the STT service. Each value represents an ISO 639-3 language code.
Attributes: acholi: Acholi language (ach). ateso: Ateso language (teo). english: English language (eng). luganda: Luganda language (lug). lugbara: Lugbara language (lgg). runyankole: Runyankole language (nyn). swahili: Swahili language (swa). kinyarwanda: Kinyarwanda language (kin). lusoga: Lusoga language (xog). lumasaba: Lumasaba language (myx).
ach, teo, eng, lug, lgg, nyn, swa, kin, xog, myx Supported languages for Speech-to-Text transcription.
This enum defines the language codes supported by the STT service. Each value represents an ISO 639-3 language code.
Attributes: acholi: Acholi language (ach). ateso: Ateso language (teo). english: English language (eng). luganda: Luganda language (lug). lugbara: Lugbara language (lgg). runyankole: Runyankole language (nyn). swahili: Swahili language (swa). kinyarwanda: Kinyarwanda language (kin). lusoga: Lusoga language (xog). lumasaba: Lumasaba language (myx).
ach, teo, eng, lug, lgg, nyn, swa, kin, xog, myx Response
Successful Response
Response model for speech-to-text transcription results.
This model represents the output of an STT transcription request, including the transcribed text, diarization data, and metadata.
Attributes: audio_transcription: The transcribed text from the audio. diarization_output: Speaker diarization data as a dictionary. formatted_diarization_output: Human-readable diarization output. audio_transcription_id: Database ID of the saved transcription. audio_url: URL or path to the processed audio file. language: The language code used for transcription. was_audio_trimmed: Whether the audio was trimmed to max duration. original_duration_minutes: Original duration if audio was trimmed.
The transcribed text from the audio
Speaker diarization data
Human-readable diarization output
Database ID of the saved transcription
URL or path to the processed audio file
The language code used for transcription
Whether the audio was trimmed to max duration
Original duration in minutes if audio was trimmed

