I have a question about using Python Google voice recognition API.

Asked 1 years ago, Updated 1 years ago, 63 views

I'm trying to sample Google API voice recognition with Python version 3.6, but there's an error.

I try to use a sample that receives micro input from grpc and outputs it.

File "transcribe_streaming.py", line 210, in main() File "transcribe_streaming.py", line 186, in main make_channel('speech.googleapis.com', 443)) as service: File "transcribe_streaming.py", line 50, in make_channel creds = credentials.get_credentials().create_scoped([SPEECH_SCOPE]) AttributeError: 'Credentials' object has no attribute 'create_scoped'

The above error occurs.

The audio recognition test for the sample audio file in the api-client was successful.

What is the problem and how can we solve it?

python voice-recognition

2022-09-22 12:52

1 Answers

I think only those who have experienced the same problem can answer it, and if I share my opinion on how to solve it, I think I will solve it by googling AttributeError: 'Credentials' object has no attribute 'create_scoped'. Google Translator says, "AttributeError: 'Credentials' object doesn't have 'create_scoped' property." Maybe you're using a different API version (Google API, but the structure may change completely when there's a major update.


2022-09-22 12:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.