Speech to Text from GCS
Transcribe audio from a Google Cloud Storage blob.
Accepts a GCS blob name, downloads the file from GCS, trims if >10 minutes, uploads a final version (if trimmed), then calls the transcription service.
Args:
request: The FastAPI request object. gcs_blob_name: Name of the blob in GCS bucket. 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:
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
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

