Connection failed (no connection to the remote host). Internal error: 1. Error details: Code: 703
See original GitHub issueIs your feature request related to a problem? Please describe. When we run TTS and STT methods from azure speech, sometimes receive the Connection Error Using TTS and STT we create an audio file from text (tts) and use an audio file for transformation to text (stt) The main problem is here success rate of these methods is not predictable, and connection error rate waves between %1-%50 We want to know why this error is happening and how to avoid that.
Describe the solution you’d like Receiving a more meaningful message from azure, to understand what is causing this.
Additional context We are using Azure Speech Python SDK, the latest version of azure-cognitiveservices-speech == 1.19.0 SDK run on Win10 machine with Py3.6 on Anaconda virtualization The PC has a proxy setting like addr=‘proxy.xx.yy’ or ‘1234.345.56.67’ and port=1234 or 8080 etc.
How we set proxy:
speech_config = SpeechConfig(subscription=self.keysub, region=self.location)
translation_config = SpeechTranslationConfig(subscription=self.keysub, region=self.location)
speech_config.set_proxy(hostname=self.proxy_addr,port=self.proxy_port, username="", password="")
translation_config.set_proxy(hostname=self.proxy_addr,port=self.proxy_port, username="", password="")
How we use methods TTS
audio_config = AudioConfig(filename=file_name)
recognizer = TranslationRecognizer(translation_config=translation_config, audio_config=audio_config)
result = recognizer.recognize_once()
STT
audio_config = AudioConfig(filename=file_name)
speech_config.speech_recognition_language = language
speech_recognizer = SpeechRecognizer(speech_config=speech_config, audio_config=audio_config)
result = speech_recognizer.recognize_once_async().get()
Some Error Message for Showing Connection Error:
Connection Error <CancellationErrorCode.ConnectionFailure> [SpeechSynthesisCancellationDetails(reason=CancellationReason.Error, error_details="Connection failed (no connection to the remote host). Internal error: 1. Error details: Code: 703. USP state: 2. Received audio size: 0 bytes.")]
Connection Error <CancellationErrorCode.ConnectionFailure> [CancellationDetails(reason=CancellationReason.Error, error_details="Connection failed (no connection to the remote host). Internal error: 1. Error details: Code: 703. SessionId: 5fb3b2b4901a41adbb735f69f39e095d")]
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
Hi @glecaros I have been running some tests, I will update the result in couple of days
Hi @ati-ince,
There should be a speechsdk version for which the latest is 1.23. 1.17 is still available, but of course we continue to improve the SDK and therefore the latest version is usually the best.
The logging is for the sdk library which is running as part of your application, so there is no way to collect logs from the service side. It certainly isn’t necessary to run with the logging on, but it is a feature provided in case we need to debug customer issues like this.