MAI Voice
v1Synthesize speech with Microsoft's MAI-Voice-1 voices via Azure AI Speech REST API.
运行时依赖
安装命令
点击复制技能文档
MAI-Voice-1
Synthesize speech with Azure AI Speech using Microsoft's MAI-Voice-1 voices.
Quick 启动 {baseDir}/scripts/speak.sh --text "Hello Steve"
Defaults:
Voice: en-us-Jasper:MAI-Voice-1 输出: ./mAI-voice.mp3 格式化: audio-24khz-160kbitrate-mono-mp3 Useful flags {baseDir}/scripts/speak.sh --text "Hello Steve" --voice en-us-Iris:MAI-Voice-1 --out /tmp/iris.mp3 {baseDir}/scripts/speak.sh --text-file /tmp/输入.txt --voice en-us-June:MAI-Voice-1 --style empathy --out /tmp/june.mp3 {baseDir}/scripts/speak.sh --text "Let's go" --voice en-us-Jasper:MAI-Voice-1 --style excitement {baseDir}/scripts/speak.sh --列出-voices
Required env vars 导出 AZURE_SPEECH_KEY="YOUR_SPEECH_RESOURCE_KEY" 导出 AZURE_SPEECH_REGION="eastus"
How to 获取 the API key and region Go to the Azure portal and open your Speech or Foundry Speech resource. Open Keys and 端点. Copy one of the resource keys. Copy the resource region, for example eastus. 导出 them: 导出 AZURE_SPEECH_KEY="YOUR_SPEECH_RESOURCE_KEY" 导出 AZURE_SPEECH_REGION="eastus"
The MAI-Voice docs currently point at East US for preview 访问, so if you are not using eastus, double-检查 that your resource actually supports the 模型 before blaming the script.
Optional:
导出 AZURE_SPEECH_输出_格式化="audio-24khz-160kbitrate-mono-mp3"
Supported voices en-us-Jasper:MAI-Voice-1 en-us-June:MAI-Voice-1 en-us-Grant:MAI-Voice-1 en-us-Iris:MAI-Voice-1 en-us-Reed:MAI-Voice-1 en-us-Joy:MAI-Voice-1 API shape
The script calls:
POST https://{AZURE_SPEECH_REGION}.tts.speech.microsoft.com/cognitive服务s/v1
Headers:
Ocp-APIm-Subscription-Key: {AZURE_SPEECH_KEY} Content-Type: 应用/ssml+xml X-Microsoft-输出格式化: {格式化} User-代理: curl
Body:
SSML with a MAI voice name optional mstts:express-as style wr应用er Notes This uses the Azure Speech REST API, not the Python SDK. Voice selection is user-configurable. Style is optional and 应用lied via SSML. MAI-Voice-1 is currently public preview.