Comments (6)
Hello,
I was using google-cloud-speech version 1.3.2, it appears they are at version 2.10 now and they made some breaking changes https://googleapis.dev/python/speech/latest/UPGRADING.html.
If you are using v2, could you please try replacing
response = client.recognize(config, audio)
(line 31)
by
request = speech_v1.RecognizeRequest(request={"config": config, "audio": audio}) response = client.list_voices(request=request)
you might also need to replace speech_v1 by speech in the file, (latest versions of the doc don't refer to speech_v1 anymore but you got an error at line 31 so perhaps it still works).
I lost the audio files I used with that project so I would appreciate to know if doing so worked for you so I can update the repo afterwards.
from annotate_audio.
Good news is that pip install google-cloud-speech==1.3.2 still works and the package runs great!! I was able to produce annotated results and review them with step 3. Love it!!
Bad news, I attempted to the google migration guidance and still have an issue:
`Traceback (most recent call last):
File "/opt/anaconda3/envs/tf3/lib/python3.6/site-packages/proto/message.py", line 505, in init
pb_type = self._meta.fields[key].pb_type
KeyError: 'request'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "get_gcp_transcription.py", line 31, in
request = speech.RecognizeRequest(request={"config": config, "audio": audio})
File "/opt/anaconda3/envs/tf3/lib/python3.6/site-packages/proto/message.py", line 511, in init
"Unknown field for {}: {}".format(self.class.name, key)
ValueError: Unknown field for RecognizeRequest: request`
from annotate_audio.
I'm glad it works!
maybe config should be a specific object and not a json anymore with version 2.10
https://googleapis.dev/python/speech/latest/speech_v1/types.html#google.cloud.speech_v1.types.RecognitionConfig
I'll try to find a sample and make it work with version 2.10 tomorrow
from annotate_audio.
just updated the repo, this should work with version 2.X as well now
from annotate_audio.
Worked perfectly! Only 2 nit-picks on your merge:
- the requirements.txt file is now 'requirement.txt' and needs to be updated in Readme
- the link on configuring the google auth should probably be this link:https://cloud.google.com/docs/authentication/getting-started
Looks great! thanks so much for merging in the change to support the latest google API! you rock!
from annotate_audio.
Indeed you are right, I'll update that.
Thanks for the feedback and kind words ^^
from annotate_audio.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from annotate_audio.