Skip to main content
The TTS service converts text to speech using on-device models running fully on the Qualcomm NPU. Audio is returned as raw PCM via HTTP chunked transfer encoding.

Prerequisites

Ensure the Audio Analytics container is deployed and running. See Running the Audio Analytics container for setup instructions.

Available models

Query the models endpoint to get the list of available TTS models and voices:
The currently available models are: Use the name value from the response in your synthesis requests.

Endpoints

Synthesize speech

Parameters:
  • text (required): Text to synthesize
  • model (required): TTS model name
  • language (optional): Language code (en, es, zh, de, it)
  • voice (optional): Voice name (default: default)
  • sample_rate (optional): Output sample rate — 44100, 22050, or 16000 Hz. Audio is resampled if different from the model’s native rate.
  • parameters.speaking_rate (optional): Speaking speed multiplier, e.g. "0.8" for slower, "1.5" for faster.
Response: Raw PCM audio streamed via HTTP chunked transfer.
TTS returns raw PCM, not WAV. Convert it to WAV before playback.

Speaking rate

Adjust the speaking speed if supported by the model, e.g. "0.8" for slower or "1.5" for faster:

Cancel synthesis

Stop an in-progress synthesis:

Close

Release TTS resources when done synthesizing:

Python example

Troubleshooting

PCM won’t play: PCM is raw audio. Convert it to WAV before playback. Poor audio quality: Try a higher sample rate (44100 Hz) or check for special characters in the input text.

Next steps

Speech recognition

Transcribe audio to text on-device

Language translation

Translate text between languages on-device