0
votes

I am a newbie & trying to convert speech to text. For this, I am trying to write a piece of code in Python 3.9/ PyCharm Community Edition.

I try writing this statement (from google.cloud import speech). However it does not recognize google.cloud. It says "Unresolved reference google".

I did install "google.cloud" using the command "pip install google-cloud". However no success.

Any idea how to do I solve this issue?

Thanks Deepak

1
Use import google-cloud-speech. The package google-cloud is deprecated as of June 18, 2018 and should not be used. Here is a link to the supported Python packages: github.com/googleapis/… - John Hanley
Doesn't work... - Deepak Goel
Sorry. Typo: import google.cloud.speech. You will need to install the package first: pip install google-cloud-speech. - John Hanley
Doesn't work still. The google in (import google.cloud.speech) shows a red underline. - Deepak Goel
Python is fairly good with its error messages. Edit your question with the results of pip freeze, python version and the error messages. - John Hanley

1 Answers

0
votes

I had the same problem for

from google.cloud import storage

Reading the suggestions above, I solved installing the google-cloud-storage package in PyCharm (that installed a lot of dependent packages). Then I changed that import in

from google.cloud.storage import client

Client was the class I needed.

Davide