An Azure communication platform for deploying applications across devices and platforms.
Hi @Kumar, Kiran
Thank you for informing us about the issue you're experiencing when connecting Azure Communication Services (ACS) with Azure AI Services to use text-to-speech (TTS) during calls. I understand you're seeing an error (subcode 8565) when combining these services, despite each working individually. This problem is often related to permissions, incorrect voice settings, service limits, or recent changes in integration. Please follow the steps below
Step 1: Check Permissions for ACS The error might mean ACS isn’t allowed to talk to your Azure AI Services resource.
- Go to the Azure Portal
- Find your ACS resource, click Identity on the left, and turn on System assigned (set it to On and click Save).
- Now go to your Azure AI Services resource (it needs to be a “Multi-service” type, not just Speech).
- Click Access control (IAM), then Add > Add role assignment.
- Pick Cognitive Services User, select your ACS resource’s managed identity, and click Review + assign.
- Or, in your ACS resource, go to the Cognitive Services tab, click Connect cognitive service, choose your Azure AI Services resource, and hit Connect.
- Give it 5-10 minutes, then test again.
Step 2: Double-Check Your Voice Settings If the voice in your code isn’t set up right, it can cause this error.
- Your code uses “en-US-AriaNeural,” which is usually fine. Just make sure it works with your region and plan.
- Here’s an example of your code (C#):
var callMedia = callConnection.GetCallMedia();
var textSource = new TextSource("Hello, this is your ACS bot speaking!")
{
VoiceName = "en-US-AriaNeural",
SourceLocale = "en-US"
};
var playResult = await callMedia.PlayToAllAsync(textSource);
- If it doesn’t work, try a different voice like “en-US-JennyNeural” or use SSML for more options:
var ssmlSource = new SsmlSource("<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xml:lang='en-US'><voice name='en-US-JennyNeural'>Hello, this is your ACS bot speaking!</voice></speak>");
var playResult = await callMedia.PlayToAllAsync(ssmlSource);
You can see all available voices in Speech Studio (speech.microsoft.com/portal/voicegallery)
Step 3: Look at Your Plan’s Limits If you’re using a free Azure AI Services plan, you might have hit a limit on how much TTS you can use.
- In the Azure Portal, go to your Azure AI Services resource > Properties > Quota limits.
- Check if you’ve used up your TTS limit (free plans allow about 0.5 million characters per month).
- If you’re out of quota, switch to a paid plan
- Go to Pricing tier, choose Standard S0, and click Apply.
- If you still hit limits, ask for a quota increase in Azure Portal > Support + troubleshooting > New support request.
Step 4: Make Sure You’re Using the Right Resource The way ACS and Azure AI Services work together changed after moving from a test (preview) phase to public use. You need a Multi-service Azure AI Services resource, not a Speech-only one.
- Check your Azure AI Services resource in the Azure Portal > Properties. It should say “Multi-service account.”
- If it’s not, create a new one:
- Search for “Azure AI services,” click Create, pick Multi-service account, and set it up in a supported region (like East US or West Europe).
- Update the connection in Step 1 to use this new resource.
- Make sure your ACS and Azure AI Services are in matching regions (check the integration guide below).
Step 5: Test and Check for Errors
- Restart your app or redeploy it to apply the changes.
- Make a test phone call to see if the TTS audio plays.
- If the error still shows up, check ACS logs:
- Go to your ACS resource > Monitoring > Logs.
- Look for “PlayFailed” or “PlayCompleted” to see what’s going wrong.
- If you need more help, please share:
- The full error message from the logs.
- The regions of your ACS and Azure AI Services resources.
- Whether your Azure AI Services is a Multi-service type.
- If you’re on a free or paid plan.
Microsoft reference:
How to Connect ACS to Azure AI Services: https://learn.microsoft.com/en-us/azure/communication-services/concepts/call-automation/azure-communication-services-azure-cognitive-services-integration
How to Fix ACS Errors: https://learn.microsoft.com/en-us/azure/communication-services/resources/troubleshooting/voice-video-calling/troubleshooting-codes?pivots=calling
https://learn.microsoft.com/en-us/azure/communication-services/how-tos/call-automation/play-action?pivots=programming-language-javascript
https://learn.microsoft.com/en-us/azure/ai-services/speech-service/text-to-speech
https://azure.microsoft.com/en-us/pricing/details/cognitive-services/
Kindly let us know if the above helps or you need further assistance on this issue.
Please "upvote" if the information helped you. This will help us and others in the community as well.
Best Regards,
Praneeth Maddali