Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.62k stars 2.83k forks source link

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

Closed rivendell1984 closed 2 months ago

rivendell1984 commented 3 months ago

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

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)

It always interrupts the speech recognition, how can I get it to return recognized speech instead of the NoMatch error?

github-actions[bot] commented 3 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @oscholz @robch.

kristapratico commented 2 months ago

@rivendell1984 apologize for the late reply, the speech SDK does not reside in this repo. Please move your issue to this repo: https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues where the maintainers of the library will be able to help. Thanks!

github-actions[bot] commented 2 months ago

Hi @rivendell1984. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

rivendell1984 commented 2 months ago

@rivendell1984 apologize for the late reply, the speech SDK does not reside in this repo. Please move your issue to this repo: https://github.com/Azure-Samples/cognitive-services-speech-sdk/issues where the maintainers of the library will be able to help. Thanks!

Thanks a lot for your reply, I'll close this issue.