calesthio/openmontage

azure-text-to-speech

Generate neural narration audio using Azure AI Speech (REST text-to-speech).

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/calesthio/openmontage --skill azure-text-to-speech

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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 · Voice gallery

Setup

Same Speech resource as azure_stt — one key/region unlocks both directions (STT and TTS). Create a Speech resource in the Azure portal; 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"]

result = tts.execute({
    "text": "Every design decision in this dashboard has a reason.",
    "voice": "andrew",                 # alias or full Azure short name
    "rate": "-4%",                     # slightly slower for narration
    # "style": "narration-professional",  # for voices that support styles
    "output_path": "projects/my-video/assets/audio/seg_001.mp3",
    "output_format": "mp3",            # or "wav" (48kHz PCM) for mixing
})

If azure_tts is unavailable (no key) or errors, fall back per its declared chain: elevenlabs_tts → openai_tts → piper_tts.

Voice selection

Curated shortlist (aliases accepted by the voice param):

AliasVoiceCharacter
andrewen-US-AndrewMultilingualNeuralwarm, confident, conversational — the default; founder/explainer register
brandonen-US-BrandonMultilingualNeuraldeeper, measured
avaen-US-AvaMultilingualNeuralconfident, bright female
guyen-US-GuyNeuralauthoritative
jennyen-US-JennyNeuralfriendly, clear

Any valid Azure voice short name may be passed verbatim (e.g. de-DE-KatjaNeural); the Multilingual voices handle non-English text well — set locale to match the text's language for correct SSML.

Parameters that matter

  • `rate` / `pitch` — SSML prosody. Narration usually reads best slightly

slowed ("-4%" to "-8%"); leave pitch at "0%" unless correcting a voice.

  • `style` — express-as style for voices that support it

(narration-professional, calm, newscast). Unsupported styles are silently ignored by Azure, so listen to a sample before batch runs.

  • `output_format` — mp3 (48kHz/192kbit) for delivery, wav (48kHz PCM)

when the segment feeds audio_mixer for further processing.

  • Determinism: a fixed voice + SSML re-renders effectively identical audio —

safe to regenerate individual segments without re-recording the whole set.

Cost

Azure neural TTS Standard tier bills roughly $16 per 1M characters (~$0.016 per 1k chars; a 150-word narration segment ≈ $0.015). The tool reports per-call cost_usd for the cost tracker. See Azure AI Speech pricing for current rates.

Limits & tips

  • One execute call = one narration segment. Generate per script section (the

asset stage convention) rather than one giant paragraph — smaller segments align cleanly to scene timings and are cheap to regenerate.

  • The synchronous endpoint caps a request at 10 minutes of audio — far above

any segment OpenMontage generates.

  • Text is XML-escaped automatically; do not pre-escape or wrap in SSML — pass

plain text plus the rate/pitch/style params.

  • Verify quality: listen to the first generated segment before batch-running a

full script (voice/style fit is a creative decision — surface it at the proposal stage per the Decision Communication Contract).

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills