Poll the Result of the TTS

Once you've summited your TTS request, you'll want to poll the result from the node.

This endpoint retrieves the result of a TTS task based on the taskId. Which you get returned as a string prior in the /createTTS

Note please to avoid overloading the API that you should poll the endpoint every 1-2 seconds.

Example request


Post: https://api.revoice.live/resultTTS

Parameters
Type
Description

taskId

String

The JobId for TTS request. should be acquired prior to making this request in the /createTTS request

POST https://api.revoice.live/resultTTS

Content-Type: application/json

{
  "taskId": "46876676774653688410"
}

Example Response


response structure:

Parameters
Type
Description

errorId

Integer

For a successful request the errorId will be always 0, if there has been an error it will be above 0. The status is not affected by this.

status

String

The processing status of your request. "pending" = queued by the processing node "processing" = being processed by the processing node "completed" = TTS generation completed by node "failed" = Processing node failed to process TTS request

message

String

Contains description on the status of the request

audio_data

String

the audio data encoded as base64, decode it for use

Example Response

successful response:

{
  "errorId": 0,
  "status": "completed",
  "message": "ML Node successfully processed text-to-speech request",
  "audio_data": "base64encodeddata..."
}

failed response:

{
  "errorId": 1,
  "status": "failed",
  "message": "ML Node is overloaded or weight is invalid"
}

Last updated