@Nishigandha Lad Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
.
I understand that you are encountering the below error while calling the API for text to speech with the following error:
ConnectionError: HTTPSConnectionPool(host='none.customvoice.api.speech.microsoft.com', port=443): Max retries exceeded with url: /api/texttospeech/3.1-preview1/batchsynthesis/talkingavatar (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7c42b2a75750>: Failed to resolve 'none.customvoice.api.speech.microsoft.com' ([Errno -2] Name or service not known)"))
.
- Firstly, your url
host='none.customvoice.api.speech.microsoft.com'doesn't seem to be correct. Please ensure that you are using the correct url.
The syntax should be:
"https://YourSpeechRegion.customvoice.api.speech.microsoft.com/api/texttospeech/3.1-preview1/batchsynthesis/talkingavatar"
.
The text to speech avatar feature is only available in the following service regions: WestUS2, WestEurope, and SoutheastAsia. More info here and here.
- You can also try testing the Text to Speech avatar (Preview) feature using the ***speech studio portal***as shown below:
-
- If you want to perform this test from Python sample code, you can leverage this sample.
- Also ensure that you don't have any proxy / firewall within your corporate network which blocks access to the Speech API endpoint.
- Also ensure that the speech endpoint api gets resolved correctly from your network DNS.
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.