-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speech_recognition broken for new Bing API #385
Comments
Same happens to me. |
I found the issue - as MS phases out the Bing Speech API in favor of Cognitive Speech Services, it's changing its servers. It was an issue in the Authentication and Recognition in the Bing section (Lines 1010 and 1040) of init.py. An updated copy of init.py is attached - just have to unzip and replace it in your |
I issued a pull request for init.py with the updated URLs for the newer Speech APIs. As soon as it's accepted in the main branch, this issue can be closed. |
Yes, you are right. However, I found a question is that directly using your modified code may still fail. From the code, I see that you are in west US. But, I'm in East US. Thus, I failed too. I modified your code to East US. Success! So, other people should pay attention on this. Thanks @brysonpayne |
I've created a PR to add the new Azure Speech API (now that the Bing API is not working). If the Bing API definitely doesn't work, I can delete that code as well in the PR. |
For anyone else who went down the rabbit hole to solve a bug in the second lab in Microsoft's AI Program (second lab of the first course), it still refers to the Bing Speech API and links to this It looks like once #389 is merged, theoretically the line in MS's Jupyter notebook can be changed from |
You, sir, are the best kind of human. I came here for just such a thing. |
I realized the answer to the below note was that this was resolved in Oct 2018 via 036a53c - when is this scheduled to be live on PyPI? When I try using recognize_azure, I'm getting the following error: I noticed when I run the following, the other methods (e.g. recognize_google) show up, but not recognize_azure: import speech_recognition as sr
import inspect
r = sr.Recognizer()
print(inspect.getmembers(r, predicate=inspect.ismethod)) Output:
|
Esto me funciono ! |
2020 same error |
For anyone interested, I fixed this in my branch. As this repo seems to be abandoned, and my past PRs have been ignored, it's unlikely it will ever be fixed here. That said, I'm not using Bing anymore myself (as it's enormously expensive), but it's accuracy is fantastic. |
The version should be bumped, tag a new release, and published to PyPI. For now anyone finding this, install with VCS or tarball/zip:
|
@rbrisita, hi, I followed your comments to reinstall the library but I still have the problem with azure. Any idea? Thanks. r.recognize_azure File "", line 1, in AttributeError: 'Recognizer' object has no attribute 'recognize_azure' |
It seems that Python is still accessing an old version. Make sure you are working in the correct environment. Please review venv then try one of the install methods I mentioned before. |
I think the endpoint should be changed so, it is better to provide both key and endpoint url from the user side. The author has assigned the fixed endpoint which is not same (https://api.cognitive.microsoft.com/sts/v1.0/issuetoken) for every user.My problem was solved with little modification.
|
Continuing an old thread, but this is unfortunately still an issue with using the SpeechRecognition package with |
Steps to reproduce
Expected behaviour
Speech recognition (speech to text)
Actual behaviour
Error - tried two different keys, multiple machines - Bing API has been updated, appears to no longer authenticate correctly with Speech_recognition 3.8.x - worked a few months ago - only thing I changed was getting a new API key.
System information
My system is Mac OS X 10.13.6 High Sierra, and Win 10 Pro/Enterprise - tested on 3 machines.
My Python version is 3.6.3 to 3.6.7, tested across 3 machines/versions. (You can check this by running
python -V
.)My Pip version is 18.1
My SpeechRecognition library version is 3.8.1
My PyAudio library version is 0.2.11
The text was updated successfully, but these errors were encountered: