AzureTTS(Text to Speech)
POST
/cognitiveservices/v1Text-to-Speech service provided by Microsoft Azure
Price: 0.02 PTC / k characters
请求参数
Header Params
Authorization
string
optional
API Key from 302.AI backend
Example:
Bearer {{YOUR_API_KEY}}
Content-Type
string
optional
Example:
application/ssml+xml
X-Microsoft-OutputFormat
string
optional
For detailed list, please view:https://learn.microsoft.com/en-us/azure/ai-services/speech-service/rest-text-to-speech?tabs=streaming#audio-outputs
Example:
riff-24khz-16bit-mono-pcm
Body Params application/xml
voice
string
required
Example
<speak version='1.0' xml:lang='en-US'>
<voice xml:lang='en-US' xml:gender='Male' name='en-US-ChristopherNeural'>
I'm excited to try text to speech!
</voice>
</speak>
示例代码
Responses
Success(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
object {0}
Example
{}
Last modified: 2 个月前