Preview. This API is a preview release and may be further refined before it is marked stable. See release stages for what that means.
For a single request/response, use the Synthesize Speech API. For real-time playback, use the Streaming API or WebSocket API. To submit many separate requests as one job, use the Batch API.
How it works
1
Submit the job
POST /tts/v1/voice:synthesizeAsync with the same request body as synchronous synthesis. The response is an operation with a name like workspaces/{workspace}/ttsAsyncJobs/{job}/operations/{operation} and done: false.2
Poll the operation
GET /lro/v1alpha/{name} with the full operation name (including its slashes) in the URL path. Poll at a modest interval — every few seconds is plenty. Short inputs typically finish within seconds; long inputs can take minutes.3
Download the results
When
done is true, a successful operation carries a response, while a failed one carries an error status instead. The response contains audioUri and (if timestampType was requested) timestampsUri. These are pre-signed URLs — fetch them without an Authorization header. They expire at expireTime, approximately 7 days after completion, so download results you want to keep.When a job requests timestamps
A job that setstimestampType needs alignment to succeed as well as synthesis. If alignment cannot be produced, the whole operation fails and carries an error — async never returns an audioUri with timestampsUri quietly missing, because a job that asked for timing and got none is not the result that was asked for.
Timestamp availability is tracked separately from synthesis, so a language can in principle synthesize while alignment for it is unavailable. Wherever that is true you find out at submit — never after paying for audio you cannot use due to the lack of timestamps. The request is rejected before any job exists:
timestampType if you want the audio without timing.
A job that passes submit can still fail during synthesis. Two outcomes are worth telling apart, because only one is worth retrying:
The synchronous and streaming endpoints behave the opposite way: they keep the audio and return success with no
timestampInfo at all. Only async and batch jobs turn a timestamp failure into a failure of the request. If you are porting code from those endpoints, a failed operation where you previously saw silently missing timestamps is expected.Listing your jobs
Persist the operationname from every submit response — it is the primary handle for polling. If you do lose one (a crash between submit and saving the name, a redeploy), list operations across all of your jobs with - in place of the job id:
filter=-done(orNOT done, ordone=false) returns only running jobs;filter=done(ordone=true) only finished ones.- Results are unordered and cover roughly the last 7 days — operations expire together with their results.
- Paginate with
pageTokenuntil a response has nonextPageToken. A short or even empty page can still be followed by more results, so the absent token — not page size — is the end signal.
ttsBatchJobs/-. The fully qualified form — workspaces/{workspace}/ttsAsyncJobs/-/operations, with the workspace id taken from the first path segment of any operation name — is also accepted, and is what Operation.name always carries.
API Reference
Synthesize Speech (Async)
Submit an asynchronous synthesis job
Get Async Operation
Poll a job’s operation until it completes
List Async Operations
List your jobs across the workspace
Next Steps
Timestamps
Get word or character timing alignment alongside your audio.
Long Text Input
Learn how long inputs are handled across the TTS APIs.
Speech Generation Best Practices
Learn best practices for synthesizing high-quality speech.