Skip to main content

Usage guide

Setup, environment variables, and Python/JavaScript/Go usage examples.

AzureTTS

Text-to-speech with Azure AI Speech neural voices. Choose it for a wide catalog of languages, voices and speaking styles. Authenticates with AZURE_SPEECH_KEY from your environment, or an explicit api_key.

Fields

str
default:"en-US-JennyNeural"
Azure neural voice name, e.g. “en-US-JennyNeural” or “en-US-AriaNeural”. Defaults to ‘en-US-JennyNeural’.
str | None
default:"UNSET"
BCP-47 language code for the voice, e.g. “en-US”. Leave unset to use the voice’s own language. Defaults to None (not set).
Optional[Mapping[str, Any]]
default:"UNSET"
Prosody settings as a mapping with rate, volume and pitch, e.g. {“rate”: “fast”, “pitch”: “high”}. Defaults to None (not set).
Optional[Mapping[str, Any]]
default:"UNSET"
Expressive speaking style as a mapping with style and degree, e.g. {“style”: “cheerful”, “degree”: 1.5}. Only some voices support styles. Defaults to None (not set).
bool
default:"UNSET"
Stream audio over a WebSocket for lower latency. Set False to use the REST API instead. Defaults to True.
str | None
default:"UNSET"
Azure region of your Speech resource, e.g. “eastus”. Falls back to the AZURE_SPEECH_REGION environment variable. Defaults to None (not set).
str | None
default:"UNSET"
Custom Speech endpoint URL. Falls back to the AZURE_SPEECH_ENDPOINT environment variable. Defaults to None (not set).
str | None
default:"UNSET"
Deployment ID of a Custom Neural Voice model. Defaults to None (not set).