"Internal error: 1. Error details: Code: 9999." returned by SpeechRecogizer (Azure Cognitive Service Speech)

KM 21 Reputation points
2021-06-09T04:55:46.627+00:00

Thank you for checking my question.

I am trying to make use of azure.cognitiveservices.speech.SpeechRecognizer to convert speech files into text on WSL (Windows Subsystem for Linux, Ubuntu 20.04.2 LTS) or on Windows Powershell, but it failed.

It returns the following result with no text.
SpeechRecognitionResult(result_id=[*I manually masked here*], text="", reason=ResultReason.Canceled)

And as I analyzed ResultReason.Canceled, it have found that
Error details: Connection failed (no connection to the remote host). Internal error: 1. Error details: Code: 9999. SessionId: [*I manually masked here*] .

What I want to know is about Error details: Code: 9999, which there are no clues about via bing/google search.

It may also have to be said that a coworker successfully got recognized text with the same api key of mine.

Any advices may save my life, and I'd like to apologize for my English skills.
Thank you.

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,743 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,866 questions
{count} votes

Accepted answer
  1. romungi-MSFT 46,476 Reputation points Microsoft Employee
    2021-06-09T06:58:27.247+00:00

    @KM In both the cases i think this could be an issue with network connection. Is there any firewall running on your machine or is the machine hosted as a VM on a private network?

    In the first case with WSL if you are using the speech SDK then you might need to configure openssl for linux for the SDK to work as expected.

    In the second case with powershell I would assume you are trying to use the REST API but error code 10060 is received. Maybe, a simple call to get a token will help identify if you are able to hit the endpoint successfully.

    $FetchTokenHeader = @{  
      'Content-type'='application/x-www-form-urlencoded';  
      'Content-Length'= '0';  
      'Ocp-Apim-Subscription-Key' = 'YOUR_SUBSCRIPTION_KEY'  
    }  
      
    $OAuthToken = Invoke-RestMethod -Method POST -Uri https://westus.api.cognitive.microsoft.com/sts/v1.0/issueToken  
     -Headers $FetchTokenHeader  
      
    # show the token received  
    $OAuthToken  
    

0 additional answers

Sort by: Most helpful

Your answer

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