Uberi / Uberi/speech_recognition

speech_recognition does not implemented the vosk wrapper

Open
#613 5 comments 0 reactions 1 assignee View on GitHub

@ftnext is already working on this.

Since Sep 30, 2022.

Dominant language
Python
Stars
9k
Forks
2.4k
Avg merge
12h 24m
Merged PRs (30d)
3

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.