angularchobo
angularchobo

Reputation: 313

Google Speech API working example for NodeJS

The Node JS example in the Google Speech API documentation is for v1 and doesn't work. It simply returns an empty response even when I use 1 channel 16000Hz FLAC.

I also tried this package - https://www.npmjs.com/package/google-speech but I cannot get authentication to work, even though I'm using the right key.

If anyone knows of a working Node example for the v2 API, I'd be grateful, I can't seem to find one.

Upvotes: 2

Views: 2794

Answers (1)

evancohen
evancohen

Reputation: 677

There were some quirks with the v1 APIs and it took them a little bit longer for them to publish the node gRPC lib than some of the other languages.

You can find the v2 docs here: https://googlecloudplatform.github.io/google-cloud-node/#/docs/speech/0.2.0/speech

You might also consider using Sonus which also supports hotword detection (aka keyword spotting). Disclaimer: this is my project

Upvotes: 3

Related Questions