Keep getting speechsdk.ResultReason.NoMatch error with USB microphone on Raspberry Pi

Liang HAN 5 Reputation points
2024-08-08T04:02:35.2566667+00:00

I am using a USB microphone on a Raspberry Pi and following the Azure Cognitive Services speech recognition sample code in Python from GitHub:

https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/python/console/speech_sample.py

...
    result = speech_recognizer.recognize_once()

    # Check the result
    if result.reason == speechsdk.ResultReason.RecognizedSpeech:
        print("Recognized: {}".format(result.text))
    elif result.reason == speechsdk.ResultReason.NoMatch:
        print("No speech could be recognized")

...

I haven't spoken, but it keeps returning the speechsdk.ResultReason.NoMatch error instead of recognizing speech:

SpeechRecognitionResult(result_id=787567342c65413589efb200b6fbf086, text="", reason=ResultReason.NoMatch)

How can I get it to return recognized speech instead of the NoMatch error?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,737 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 24,625 Reputation points Microsoft Employee
    2024-08-08T05:45:06.4033333+00:00

    @Liang HAN Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    .

    Please be aware that the Speech Devices SDK is now retired.

    .

    The SDK has issues reported on Raspberrian Pi OS in the past. I have seen issues on the SDK issues pages. Refer this thread for similar issue.

    .

    You can however install the supported libraries for windows or linux OS. For example: With the SDK version 1.11.0 binaries for linux ARM32 and ARM64 are released for raspberry pi. You could also try with 1.16.0 SDK version and check. .

    Also, the SDK issues pages here and here are the official support page for issues related to the SDK. I hope this helps.

    0 comments No comments

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.