Realtime TTS-2 is live. Built for realtime conversation that feels human. Read the Realtime TTS-2 announcement

TextToSpeech

Get async operation

Poll the status of an asynchronous or batch synthesis job. Substitute the full operation name returned by the submitting endpoint (including its slashes) directly into the URL path. Poll at a modest interval (for example every 5 seconds): short inputs typically complete within seconds, while long inputs and large batches can take minutes.

GET/lro/v1alpha/{name}

Authorizations

Authorizationstringrequired

Your authentication credentials. For Basic authentication, please populate Basic $INWORLD_API_KEY. You can create a key in one command with the Inworld CLI: inworld workspace add-key.

Path Parameters

namestringrequired

Full operation resource name returned by the async or batch synthesis endpoint, in the format workspaces/{workspace}/ttsAsyncJobs/{job}/operations/{operation} or workspaces/{workspace}/ttsBatchJobs/{batch}/operations/{operation}. The embedded slashes are part of the path.

Response

200 - application/json

namestring

Server-assigned operation resource name, in the format workspaces/{workspace}/ttsAsyncJobs/{job}/operations/{operation} for async jobs or workspaces/{workspace}/ttsBatchJobs/{batch}/operations/{operation} for batch jobs. Pass it verbatim as the path of the Get operation endpoint to poll for completion.

metadataobject

Service-specific metadata associated with the operation. A batch job carries SynthesizeSpeechBatchMetadata counting the items finished so far, from the moment the batch is accepted through to the terminal response. An async job carries none: it is a single unit of work, so done already says everything there is to know.

Show child attributes

@typestring

totalItemsinteger

Number of items in the batch. Fixed when the batch is accepted, so it is readable before any work starts.

completedItemsinteger

Items synthesized successfully so far. A zero counter is spelled out as 0 on the submit response but omitted from the poll response, so read it with a default rather than testing whether the key is present.

failedItemsinteger

Items that finished with an error so far. Item errors do not fail the batch — it still completes, and every item keeps its own entry in the results file. Omitted from the poll response while zero.

createTimestring

When the batch was accepted.

doneboolean

If false, the job is still running. If true, the job has finished and exactly one of error or response is set.

errorobject

Show child attributes

codeinteger

The error code, as specified by gRPC status codes.

messagestring

A short description of the error.

detailsobject[]

Show child attributes

@typestring

responseoneOf

Set when the job succeeded. Its @type identifies which kind: an async job carries SynthesizeSpeechAsyncResponse, a batch job SynthesizeSpeechBatchResponse.