WS_OPEN_ERROR_UNDERLYING_IO_ERROR error when testing text to speech sample code

Tristan Bailey 30 Reputation points
2023-01-21T10:41:10.43+00:00

I am trying to get text to speech sample code working in Visual Studio 2022, as can be seen on the following webpage:

[https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-csharp

I have the necessary SDKs installed (both C++ and Microsoft Cognitive Services Speech). I have created an Azure account and speech service resource, and have applied the key I was supplied and relevant region to environment variables. However, I have not been able to get the code to work. After running the code, I type in a phrase to be spoken, and the following error message appears:

CANCELED: Reason=Error
CANCELED: ErrorCode=ConnectionFailure
CANCELED: ErrorDetails=[(Connection failed (no connection to the remote host). Internal error: 11. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_ERROR

screenshot

I have seen similar errors reported by other people, but not this exact one.

I verified the key and region, using the PowerShell code supplied on another page. I have also tried using other regions, at the request of a Microsoft employee via chat, but that did not work either. What am I missing?

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
{count} vote

1 answer

Sort by: Most helpful
  1. Tristan Bailey 30 Reputation points
    2023-01-27T05:11:30.8133333+00:00

    Hi romungi,

    Thanks for your response. The issue is now resolved. I am not quite sure what the cause of the problem actually was, but after I upgraded the operating system from Windows 10 to Windows 11, and applied the latest updates, the problem seems to have fixed itself. I cannot say yet whether this will work once compiled and run on another computer, though, as I haven't quite got that far.

    Also, before I could get a voice to work, I needed to try the entire list of voices under the 'australiaeast' region. In fact, I could only get two of the region's voices to work (Natasha and William). All other voices caused Error code 1107: unsupported voice.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.