(deprecated) GET /api/speak/{ :id }

CAUTION This API is deprecated. Please use GET /api/speak/v2/{ :id }

  • Read the status about synthesis voice.

Request

curl \
  --request GET \
  --url https://typecast.ai/api/speak/{your-speak-id} \
  --header "Authorization: Bearer $API_TOKEN"

Parameters

None

Response

{
  "result": {
    "status": "done",
    "audio": {
      "url": "https://typecast.ai/files/speak/ZGF0YS9zLzIwMjAvNC8yMy9saWdodC13b3JrZXItYzRjNTk5NTlmLTVmNzUyLzA3ZGY5MmUyLWM3NTktNDkyNS05NTQ2LWQ1ZTg5ODdiNjM1YS53YXY=",
      "extension": "wav"
    }
  }
}
  • audio.url: URL for getting the audio file.

  • audio.extension: File format of the audio file.

  • status: status of synthesizing voice

status value

Description

done

Downloadable audio file is ready.

progress

You have to wa it few seconds.

failed

Your request is failed.

Error

{
  "message": {
    "msg": "not authorized",
    "error_code": "auth/not-authorized"
  }
}
  • message.error_code:

status code

error code

description

401

auth/not-authorized

Authoriazation value in headers is not valid

404

There is no speak at the requested API address

  • The error case of GET /files/speak/{:encoded_file_name}

status code

error code

description

401

auth/not-authorized

Authoriazation value in headers is not valid

404

There is no speak at the requested API address