跳到正文
Skillpedia
音频与语音75k · #2641

azure-text-to-speech

它能做什么

这项技能使用 Azure 神经网络声音,把文字转换为语音旁白。适合需要多种语言高质量配音的视频制作者。

适用场景

  • ✓当你的视频需要根据书面脚本制作旁白或配音时。
  • ✓当你需要本地工具不支持的语言中的高质量云端声音时。
  • ✓当你想用标记语言控制语速或说话风格时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/calesthio/OpenMontage/blob/main/.agents/skills/azure-text-to-speech/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把这段脚本转为温暖、友好的配音,用于我的教程视频。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体把文字和所选声音发送到 Azure 语音服务,服务返回音频文件。你可以使用简单的标记语言调整语速和风格。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

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:

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):

Alias Voice Character
andrew en-US-AndrewMultilingualNeural warm, confident, conversational — the default; founder/explainer register
brandon en-US-BrandonMultilingualNeural deeper, measured
ava en-US-AvaMultilingualNeural confident, bright female
guy en-US-GuyNeural authoritative
jenny en-US-JennyNeural friendly, 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-e
常见问题

我需要设置什么?

你使用与语音转文字技能相同的 Azure Speech 密钥和地区。

如果没有设置 Azure 怎么办?

本地文字转语音工具是默认的离线选项。

它能克隆我的声音吗?

不能。该技能说明,声音克隆需要使用另一种工具。

详情

作者的原始描述

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.

repo: calesthio/OpenMontage

热度

GitHub 星标
75k
排名
#2641
许可证
AGPL-3.0
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能