hacktronaut / azure-avatar-demo

Text To Speech Demo in ReactJS Application using Azure Avatar AI Service.
17 stars 10 forks source link

Could not create relay token #3

Closed SaiRev0 closed 1 month ago

SaiRev0 commented 1 month ago

I followed the steps from the article you poster, but I'm getting the error that

"message": "Error \"SyntaxError: Unexpected token '<', \"<h2>Our se\"... is not valid JSON\" occurred while parsing the response body - <h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>

I don't know why I'm getting this error. If you know, please help

I'm able to get the relayClient but can't get the config

hacktronaut commented 1 month ago

@SaiRev0 I think they have retired TURN servers. Check this out https://azure.microsoft.com/en-gb/updates/retirement-notice-azure-communication-services-network-traversal-turn-public-preview-is-retiring/#:~:text=Azure%20Communication%20Services%20Network%20Traversal%20(TURN)%20will,March%202024.Please%20migrate%20to%20an%20external%20service

You can setup your own turn servers by following this tutorial --> https://raokarthik83.medium.com/azure-avatar-tts-update-migrating-from-azure-turn-to-coturn-14b6ac86d60c

Please let me know if you are facing any challenge.

hacktronaut commented 1 month ago

Just tried to get relay tokens from my side. Even I am also not able to get those tokens anymore. :smile:

Just follow this you will not face any issue https://raokarthik83.medium.com/azure-avatar-tts-update-migrating-from-azure-turn-to-coturn-14b6ac86d60c

SaiRev0 commented 1 month ago

@hacktronaut Thanks a lot for your response. After reading the Microsoft documentation attached, I got the ICE server details, even without all the hassle, and it's even easier than the previous method. You just have to make a get request, and you will be able to get the details

curl --location --request GET 'https://<YOUR_RESOURCE_REGION>.tts.speech.microsoft.com/cognitiveservices/avatar/relay/token/v1' \ --header 'Ocp-Apim-Subscription-Key: <YOUR_RESOURCE_KEY>'

I highly recommend that you update the first Medium blog post. It will be beneficial to everyone

hacktronaut commented 1 month ago

super ! :smile: I will update the post. Thanks @SaiRev0 for the response. I am closing this issue.