Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to resolve missing google-api-python-client module using speech recognition

I am trying to run speech recognition on tinkerboard with Armbian installed. I am always geting this error

ERROR - Error fetching results from Speech Recognition service missing google-api-python-client module: ensure that google-api-python-client is set up correctly.

Even when I check installed packages in pip by using pip list, I can see that google-api-python-client is installed.

pip list output

cachetools (2.1.0)
certifi (2018.10.15)
chardet (3.0.4)
google-api-python-client (1.7.4)
google-auth (1.5.1)
google-auth-httplib2 (0.0.3)
httplib2 (0.11.3)
idna (2.7)
Mirage (0.9.5.2)
pip (9.0.1)
pyasn1 (0.4.4)
pyasn1-modules (0.2.2)
PyAudio (0.2.11)
pycairo (1.16.2)
requests (2.20.0)
rsa (4.0)
setuptools (40.4.3)
six (1.11.0)
SpeechRecognition (3.8.1)
uritemplate (3.0.0)
urllib3 (1.24)
wheel (0.32.2)

Output on console is

tinkerboard@tinkerboard:~/Documents/smarthome_studyplatform/py_workspace/voice_assistant1.0/speech_recognition$ python assistant2.0.py -u rahul -a GoogleCloudSpeech -l english
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
10/25/2018 10:02:07 PM - __main__ - INFO - Language : english
10/25/2018 10:02:07 PM - __main__ - INFO - API : GoogleCloudSpeech
10/25/2018 10:02:07 PM - __main__ - INFO - User : rahul
10/25/2018 10:02:07 PM - __main__ - INFO - Initiating speech recognition.
10/25/2018 10:02:08 PM - __main__ - INFO - Setting minimum energy threshold to [117.178533524]
10/25/2018 10:02:08 PM - __main__ - INFO - Waiting for user query
10/25/2018 10:02:11 PM - __main__ - INFO - Audio captured, begin speech to text.
10/25/2018 10:02:12 PM - __main__ - ERROR - Error fetching results from Speech Recognition service missing google-api-python-client module: ensure that google-api-python-client is set up correctly.

Please can some one suggest why I get this error and how can I resolve it?

Thanks

like image 753
Loui Avatar asked Sep 10 '25 13:09

Loui


1 Answers

I had this error as well, trying to use the SpeechRecognition library and got 'missing google-api-python-client module: ensure that google-api-python-client is set up correctly.'

Replying to add visibility to F10's comment on the question and follow up that their advice did resolve it: ensure that oauth2client is installed.

Use

pip install oauth2client

or

pip3 install oauth2client.

In some environments, you may need sudo pip install oauth2client or sudo pip3 install oauth2client

like image 70
konahart Avatar answered Sep 13 '25 05:09

konahart