When running the Golang version of Quickstart: Convert text to speech, this error appears.
Synthesis started.
CANCELED: Reason=1.
CANCELED: ErrorCode=5
CANCELED: ErrorDetails=[Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED
wss://westus.tts.speech.microsoft.com/cognitiveservices/websocket/v1
X-ConnectionId: 02f16471298847bb89fcebf5a3d474cc USP state: Sending. Received audio size: 0 bytes.]
CANCELED: Did you set the speech resource key and region values?
Furthermore, Speech Service via spx cli also fails, but spx cli is not my main concern. Rather, this is to show how general the problem is.
$ spx synthesize --text "Enjoy using the Speech CLI." --audio output my-sample.wav
SPX - Azure Speech CLI, Version 1.29.0
Copyright (c) 2022 Microsoft Corporation. All Rights Reserved.
audio.output.file=my-sample.wav
audio.output.type=file
diagnostics.config.log.file=log-{run.time}.log
service.config.key= 1ef5****************************
service.config.region=eastus
synthesizer.input.text=Enjoy using the Speech CLI.
synthesizer.input.type=text
x.command=synthesize
x.input.path=@none
SYNTHESIS STARTED: ca5354d966964c15b0c1630c601535a9
CANCELED: Reason=Error
CANCELED: ErrorCode=ConnectionFailure
CANCELED: ErrorDetails=Connection failed (no connection to the remote host). Internal error: 1. Error details: Failed with error: WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED
wss://eastus.tts.speech.microsoft.com/cognitiveservices/websocket/v1
X-ConnectionId: cbaf9bdda02c42c796fef1bdd071bbf9 USP state: Sending. Received audio size: 0 bytes.
CANCELED: Did you update the subscription info?
Particulars
- OS: Ubuntu 22.04.2 LTS
- Programming Language: Golang (though also command line with the second example I gave).
- Client: localhost
- Home network, located in the U.S.
- Yes, I checked my bloody Azure resource key and region value.
- Yes, I checked the Azure Speech Service itself (Status: Active)
- Yes, I made a new Azure Speech Service in a different region. Note
westus
in the first example andeastus
in the second example. That didn't work (suggested by this github post).
I am facing this problem on my main work laptop. Both my Golang code and SPX (command line) work on my other laptop.