question

ShawnLiu-5848 avatar image
0 Votes"
ShawnLiu-5848 asked ShawnLiu-5848 commented

SPX synthesize error ErrorCode=ConnectionFailure

I am following the document here( https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=script%2Clinuxinstall&pivots=programmer-tool-spx) to quick start a tts on CentOS 8.2 with Speech CLI.
When running sample command "spx synthesize --text "The speech synthesizer greets you!" --audio output greetings.wav"
I got the following error

SYNTHESIS STARTED: c88154c****e33c80
CANCELED: Reason=Error
CANCELED: ErrorCode=ConnectionFailure
CANCELED: ErrorDetails=Connection failed (no connection to the remote host). Internal error: 1. Error details: Code: 2542. USP state: 2. Received audio size: 0 bytes.
CANCELED: Did you update the subscription info?

Please help. Thanks.

azure-cognitive-servicesazure-speech
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ShawnLiu-5848 Thanks for your question.

Quickly reviewing through your error - Just wanted to confirm with you whether you have configured correct Subscription Key and Region using the below commands.

 spx config @key --set bb....79
 spx config @region --set westus

You could refer this article to find your subscription key.

Also, I was able to reproduce the similar error at my end when I had configured the incorrect Subscription and Region.


0 Votes 0 ·
ShawnLiu-5848 avatar image ShawnLiu-5848 SathyamoorthyVijayakumar-MSFT ·

Hi @SathyamoorthyVijayakumar-MSFT, thank you for your prompt response.
Yes, I did set the key and region and I confirmed these two files generated after configuration.
Any other reason might cause the connection failure?

BTW, the CentOS 8.2 running on an Azure VM, that locates in the same region as the Speech Service (eastasia)

0 Votes 0 ·

1 Answer

SathyamoorthyVijayakumar-MSFT avatar image
0 Votes"
SathyamoorthyVijayakumar-MSFT answered ShawnLiu-5848 commented

@ShawnLiu-5848 , Thanks for your response.

I quickly did a set up at my end (Azure Linux VM) and I was able to do observe the same issue at my end.

Ran the below command :

 spx synthesize --text "Enjoy using the Speech CLI." --audio output my-sample.wav

Output :

96047-image.png


Checked the logs using the below command. CAT log-<Number>.log . You can do dir command to find out your log file name.

Observed the below lines in the log traces :

 [787457]: 145ms SPX_TRACE_ERROR: AZ_LOG_ERROR:  tlsio_openssl.c:690 error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
 [787457]: 145ms SPX_TRACE_ERROR:  trace_message.cpp:193 Error: File:/home/vsts/work/1/s/external/azure-c-shared-utility/adapters/tlsio_openssl.c Func:send_handshake_bytes Line:690
 [787457]: 145ms SPX_TRACE_ERROR: AZ_LOG_ERROR:  tlsio_openssl.c:2433 FORCE-Closing tlsio instance.
 [787457]: 145ms SPX_TRACE_ERROR:  trace_message.cpp:193 Error: File:/home/vsts/work/1/s/external/azure-c-shared-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_close Line:2433
 [787457]: 145ms SPX_TRACE_ERROR:  web_socket.cpp:874 WS open operation failed with result=1(WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED), code=2542[0x000009ee]

Appeared like there was some issues with the SSL certificate verification.

Ran the below command to set SSL cert file location.

  export SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt

I was able to run the command and get output successfully :

96019-image.png


Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.







image.png (11.2 KiB)
image.png (11.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @SathyamoorthyVijayakumar-MSFT for your support, that does solve the issue in my env as well.

0 Votes 0 ·