# Azure Text-to-Speech

Generates neural narration audio from text using Azure AI Speech.

- Repository: https://github.com/calesthio/OpenMontage (74341 stars)
- Category: Media
- License: MIT
- Last updated: 2026-10-28
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add calesthio/OpenMontage --skill azure-text-to-speech -g -a claude-code -y`
Codex: `npx skills add calesthio/OpenMontage --skill azure-text-to-speech -g -a codex -y`
Cursor: `npx skills add calesthio/OpenMontage --skill azure-text-to-speech -g -a cursor -y`
Gemini CLI: `npx skills add calesthio/OpenMontage --skill azure-text-to-speech -g -a gemini-cli -y`

## Description

Generate neural narration audio using Azure AI Speech (REST text-to-speech). Use when synthesizing voiceovers or narration in OpenMontage. Optional cloud TTS provider, preferred when AZURE_SPEECH_KEY is configured; the local piper_tts remains the default offline path. Shares one Speech resource with azure_stt.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Azure AI Speech, Text-to-Speech

Generate narration with **Azure neural TTS**, high-quality multilingual voices,
SSML prosody control, and express-as styles, served synchronously by the REST
`/cognitiveservices/v1` endpoint (no token exchange, Blob storage, or job
polling). In OpenMontage this is exposed through the `azure_tts` tool
(`capability=tts`, `provider=azure`). It is an **optional cloud TTS provider**, when `AZURE_SPEECH_KEY` is configured, prefer it for high-quality cloud
narration. The local `piper_tts` remains the **default offline path** and the
fallback when Azure is unavailable; `elevenlabs_tts` remains the choice for
voice cloning.

> Docs: [REST text to speech](https://learn.microsoft.com/azure/ai-services/speech-service/rest-text-to-speech) · [Voice gallery](https://speech.microsoft.com/portal/voicegallery)

## Setup

Same Speech resource as `azure_stt`, **one key/region unlocks both directions**
(STT and TTS). Create a **Speech** resource in the
[Azure portal](https://portal.azure.com); copy the key and region from its
**Keys and Endpoint** page.

```bash
export AZURE_SPEECH_KEY=your_speech_resource_key
export AZURE_SPEECH_REGION=eastus        # your resource's region
# export AZURE_TTS_ENDPOINT=https://...  # optional: full custom TTS host
#   (the TTS host is https://<region>.tts.speech.microsoft.com, a different
#    subdomain than the STT endpoint, hence the separate override var)
```

`azure_tts` reports `AVAILABLE` once `AZURE_SPEECH_KEY` plus either
`AZURE_SPEECH_REGION` or `AZURE_TTS_ENDPOINT` are set.

## Using it in a pipeline

Route through `tts_selector` as usual (it auto-discovers `azure_tts`), or call
the provider tool directly when the user has approved Azure:

```python
from tools.tool_registry import registry
registry.discover()
tts = registry._tools["azure_tts"]

The rest: https://github.com/calesthio/OpenMontage/blob/HEAD/.agents/skills/azure-text-to-speech/SKILL.md
