azure-search-openai-demo
azure-search-openai-demo copied to clipboard
Unable to use Azure Speech SDK with custom subdomain
I am unable to get the Azure Speech SDK to work with a custom subdomain i.e. MyAiServices.cognitiveservices.azure.com.
This isn't a bug with this project per se, but I cannot find any documentation that's correct/works. I've read through this article, but still cannot get this to work.
From the above document, it seems you need to use an explicit endpoint and key (not token based auth), but it's returning a 404, so I assume this is more an issue with the AI services endpoint/documentation.
speech_endpoint = "wss://australiaeast.tts.speech.microsoft.com/cognitiveservices/websocket/v1"
speech_config = SpeechConfig(endpoint=speech_endpoint, subscription=<KEY GOES HERE>)
Using the explicitly defined endpoint as above, works as expected. However when using wss://MyAiServices.cognitiveservices.azure.com/tts/cognitiveservices/websocket/v1 as the endpoint, it returns a 404.
It seems you need to create a custom subdomain and create a private endpoint for the Speech API to work. Currently I cannot do that due to how my environment is setup, but regardless, the code would still need to be changed to account for this (if someone were to want to use the custom endpoint/private link).