Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
6.15k stars 4.18k forks source link

Unable to use Azure Speech SDK with custom subdomain #1905

Open TaylorN15 opened 2 months ago

TaylorN15 commented 2 months ago

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.

TaylorN15 commented 2 months ago

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).