question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

speech_recognition does not implemented the vosk wrapper

See original GitHub issue

I’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:

image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
nshmyrevcommented, Oct 1, 2022

Clone this repository and install from source

You can do it with a single pip command actually:

pip3 install git+https://github.com/Uberi/speech_recognition
1reaction
Enhexcommented, Jun 17, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found