Sync Text To Speech With Timestamps
Synthesise speech and return audio with per-word alignment timestamps.
Resolves the voice preset, validates quota, then calls the versioned gRPC handler with include_durations=True. Returns a TTSAudioResponse containing base64-encoded audio and character-level start/end times in milliseconds.
Args: tts_request: TTS parameters (text, voice, model, output format, etc.). 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: TTSAudioResponse: Base64-encoded audio and word-level alignment data.
Raises: NotSupportedModel: When the requested model does not support the voice. VoiceNotFound: When the voice preset cannot be resolved. UsageLimitExceeded: When the token has exhausted its quota.
Request
- Base URLhttps://api.async.com (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Request body
Example request
{
"transcript": "Hello, world!"
}Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.