Integration Of Google Speech API V2
Hi,
I’m trying to integrate Google cloud speech recognition v2 in it. I can get the audio recorded, have created Service key and API key but whenever I try to access it, I just get 403 access denied. I am at my wits end here.
Has anybody tried it ? were you successful ? Could you please guide me how to do it ?
I’ll be grateful to you if this works !
11 thoughts on - Integration Of Google Speech API V2
Yes! But I can only tell you if you can use Python, as I used Google’s own demo code.
If you can hold on for half an hour, I’ll remove personal info and put a version up on Github if you’re interested?
Hi Jonathan
Thanks !
That would indeed be wonderful, at this point I really do not care whether I need to use Python or Lua or JS.
I was following http://zaf.github.io/asterisk-speech-recog/
but hit a road end with (for the lack of sane word ) copulating Google’s Key
Did you already tried the cloud_api branch?
Regards,
Marcelo H. Terres
IM: mhterres@jabber.mundoopensource.com.br https://www.mundoopensource.com.br https://twitter.com/mhterres https://linkedin.com/in/marceloterres
I’ve had Lefteris’ code running for a few years without a problem.
I don’t have a service key but I have entered my API key in the script in the ‘User defined parameters’ section. You did that, right? What do the other user defined parameters in your script look like?
Hi Marcelo,
Thanks for replying, I do not know what this branch is. Could you please let me know.
Also, I enabled google cloud speech API only from the console. Do I need more API enabled?
Hi Mark,
Thanks for replying.
Yes, I put my API key. I can see request going over HTTPS and then I get response from Google Cloud that I do not have the access and this is an invalid key. However, when I use the same key in .json format in the Google samples, I get a successful response.
# —————————– #
# User defined parameters: #
# —————————– #
# Speech API key #
my $key = “
Hi Rahul,
So sorry – I got interrupted. Anyway, this is the library I am using –
seems much smaller and uses the correct endpoints.
https://github.com/invitecomm/asterisk-speech-recog/tree/master/v1beta1
The link in that README is broken – I’ve put in a pull request, but for now, the correct git repository for the API mentioned is https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/speech/cloud-client
Hope that all makes sense!
If you clone zaf repository you will find a branch called cloud_api that works with the new version.
In the link that you sent you will find information about it.
Regards,
Development snapshots that support Speech API v2 are available in either zip
<https://github.com/zaf/asterisk-speech-recog/zipball/master> or tar
<https://github.com/zaf/asterisk-speech-recog/tarball/master> formats.
A version that supports the new Cloud Speech API
<https://cloud.google.com/speech> can be downloaded here
<https://github.com/zaf/asterisk-speech-recog/archive/cloud_api.zip>.
You can also clone the project with Git <https://git-scm.com/> by running:
$ git clone git://github.com/zaf/asterisk-speech-recog
Yeah, I was using this one and was getting 403 on each and every attempt.
Thanks a bunch Jonathan !
Let me try it out.