Using watson Speech to Text from a browser with websockets (Live detection)

486 views Asked by At

I want to use IBM Watson Speech to Text from the browser with "Live Detection" i.e. I don't want to record the audio and send files, instead I want to use the websockets option for continuous speech to text.

I found this git repo https://github.com/watson-developer-cloud/speech-javascript-sdk

But I could not find any actual example on how to use. Can someone show me some code exaple of how to use it (or some other alternative).

I believe the WatsonSpeech.SpeechToText.recognizeMicrophone({token}) is probably what I need and some example of hot to use it would be enough.

1

There are 1 answers

0
Ed Shee On BEST ANSWER

Here's an example of it in action

You can find the source code for this on github here

I think the bit you're looking for is in /src/socket.js