Speaks the text in file-script-text and returns the audio, without storing it. Use it to preview a greeting, hold message, or music on hold (MoH) file before you create it.Needs the create right on audio for the user in the path: Basic User, Advanced User, Simple User, and Call Center Agent for themselves; Office Manager, Site Manager, Call Center Supervisor, Route Manager, Reseller, and Super User for any user in the domain. Office Manager Read-Only and Super User Read Only get 403. Synthesis also needs text to speech enabled (PORTAL_VOICE_TEXT_TO_SPEECH) for the user in the path, or the call returns 400; the voice service answers for that user, and refuses with 403 when its settings do not allow text to speech.Returns the audio as audio/wav (8 kHz, 8-bit, mono), named tts_<hash>.wav in Content-Disposition. A request with a Range header gets 206 with that byte range unless you send download. The same words in the same voice for the same user are rendered once and served from cache afterward. The voice defaults to the domain's text-to-speech voice (en-US-Wavenet-C in en-US when none is set). Text to speech not enabled for the path user, or a text-to-speech-language that is not a BCP 47 tag, returns 400; a voice-service failure, including no voice for the language, returns 503. There is no usage cap: synthesis is limited only by your scope and the platform's general request rate limit, and each new text is a call to the voice service. Usage is billed to the owner in the path: that user, or the domain itself for a domain-owned path.
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params
Body Params application/json
Examples
Responses
🟢200OK
audio/wav
The spoken audio, audio/wav. The body is binary and cannot be shown.
🟠400Bad Request
🟠401Authentication Required
🟠404Record not found
🟢206Partial Content
🟠403Forbidden
🔴500Internal Server Error
🔴503Service Unavailable
Request Request Example
Shell
JavaScript
Java
Swift
curl--location'https://awqacore01.crexendocloud.com/ns-api/v2/domains//users//voices' \
--header'Authorization: Bearer <token>' \
--header'Content-Type: application/json' \
--data'{
"file-script-text": "Hi, you have reached extension 1001. Please leave a message.",
"text-to-speech-voice-id": "en-US-Wavenet-C",
"text-to-speech-language": "en-US"
}'