speech_recognition does not implemented the vosk wrapper
See original GitHub issueI’m trying to use speech_regognition with vosk. But when I try to call the vosk method I receive the following message:
Traceback (most recent call last):
File "C:\Users\user\projects\\studies\speechreco.py", line 27, in <module>
text = recognizer.recognize_vosk(audio)
AttributeError: 'Recognizer' object has no attribute 'recognize_vosk'. Did you mean: 'recognize_api'?
The method is:
import speech_recognition as speechreco
import vosk
while True:
try:
print("begin loop")
with speechreco.Microphone() as mic:
recognizer.adjust_for_ambient_noise(mic)
print("begin listening")
audio = recognizer.listen(mic)
text = recognizer.recognize_vosk(audio)
...
It looks like the vosk wrapper is not implemented at the version:
vosk - 0.3.42 python - 3.10.4
Need I use a downgrade version?
I follow the sample:
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Issues · Uberi/speech_recognition - GitHub
Speech recognition module for Python, supporting several engines and APIs, online and offline. ... speech_recognition does not implemented the vosk wrapper.
Read more >Vosk Installation - Alpha Cephei
Accurate speech recognition for Android, iOS, Raspberry Pi and servers with Python, Java, C#, Swift and Node.
Read more >Vosk Speech Recognition Toolkit - Raspberry Pi Forums
I tried to follow the instructions and ran into error - No module named 'sounddevice' when I tried to run the microphone example....
Read more >@sharcoux/vosk-api - npm
This is an FFI-NAPI wrapper for the Vosk library. Usage. It mostly follows Vosk interface, some methods are not yet fully implemented.
Read more >How to Run OpenAI's Whisper Speech Recognition Model
Whisper also requires FFmpeg, an audio-processing library. If FFmpeg is not already installed on your machine, use one of the below commands to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can do it with a single pip command actually:
version 3.8.1 doesn’t include vosk (master does, so I guess it will be in the next release?): https://github.com/Uberi/speech_recognition/blob/3.8.1/speech_recognition/__init__.py
I’m also interested in using Vosk as it seems to be the only offline option that actually works.