v1
latestOpenAPI 3.1.02026-07-13212942.9 KBSync Text To Speech With Signed Url Output
Synthesise speech and return a short-lived GCS signed URL to the audio file.
Calls :func:sync_text_to_speech internally, uploads the resulting audio to the configured GCS bucket, generates a signed download URL (TTL controlled by GENERIC.sync_tts_results_expiration_time_minutes), and returns it.
Args: tts_request: TTS parameters (text, voice, model, output format, etc.). background_tasks: FastAPI background-task queue used for temp-file cleanup. token_service: Injected token validation service. _request: Raw FastAPI Request used for rate-limiting. x_api_key: Bearer API key from the x-api-key header. version: API version extracted from the version request header. tts_service_stub: gRPC stub connected to the XCODEC synthesis server.
Returns: SyncTTSWithSUAudioResponse: Signed GCS URL pointing to the synthesised audio.
Raises: Exception: Re-raises any error that occurs during GCS upload or URL generation.
Headers
Request body
Example request
{
"transcript": "Hello, world!"
}Response
Successful Response
Example response
{
"signed_url": "https://storage.googleapis.com/bucket_name/audio_file.wav"
}