Hi FU SHIJIE,**
**Thank you for reaching out! I understand you're working on getting Text-to-Speech set up, and I'm here to help make this process as smooth as possible for you.
Azure Text-to-Speech works in two simple steps, and I'll walk you through each one:
Step 1: Get Your Authorization Token
Method: POST
URL: https://YOUR_REGION.api.cognitive.microsoft.com/sts/v1.0/issuetoken
Example: https://eastus.api.cognitive.microsoft.com/sts/v1.0/issuetoken
Headers:
Ocp-Apim-Subscription-Key: YOUR_AZURE_SPEECH_KEY
Content-Length: 0
Body: Leave this empty.
Once you click Send, you'll receive a long token string in the response body. This is your Bearer token - just copy it for the next step.
Step 2: Create Your Text-to-Speech Request
Method**:** POST
URL: https://YOUR_REGION.tts.speech.microsoft.com/cognitiveservices/v1
Example: https://eastus.tts.speech.microsoft.com/cognitiveservices/v1
Headers:
Authorization: Bearer <speech_token>
Content-Type: application/ssml+xml
X-Microsoft-OutputFormat: riff-16khz-16bit-mono-pcm
User-Agent: Bruno-TTS
Body → Select "Raw" and paste this SSML:
<speak version="1.0" xml:lang="en-US">
<voice name="en-US-JennyNeural">
Hello! This audio was generated using Azure Text to Speech and Bruno.
</voice>
</speak>
After clicking Send, you'll receive your audio file in the response!:
Please accept this as an answer.
Thank you for using Microsoft Q&A Portal, and happy coding!😊