watson-developer-cloud / speech-javascript-sdk

Library for using the IBM Watson Speech to Text and Text to Speech services in web browsers.
https://watson-speech.mybluemix.net/
260 stars 133 forks source link

continuous: false option is no longer supported #46

Closed playground closed 7 years ago

playground commented 7 years ago

After chrome updated to version 58.0.3029.110, microphone no longer auto stops after first pause.

var stream = WatsonSpeech.SpeechToText.recognizeMicrophone({ token: token, continuous: false, // false = automatically stop transcription the first time a pause is detected outputElement: '#output' // CSS selector or DOM Element });

And calling stream.stop.bind(stream); does not stop transcripting either. This example http://localhost:3002/microphone-streaming-auto-stop.html was too working up until 5/18/2017

nfriedly commented 7 years ago

This is a service-level change that just went into effect yesterday: https://www.ibm.com/watson/developercloud/doc/speech-to-text/release-notes.html#May2017

Basically, the continuous=false option is no longer supported. I'll get this SDK updated soon to make that more clear, but I have quite a lot on my plate tright now, so it'll probably be at least a week.

If you'd like to send a PR that removes it from the Readme, recognize-stream.js (code and JSDoc), and the examples, I'd be happy to merge it in and get the update released sooner.

playground commented 7 years ago

Ah, good to know. I was out for a week and just started back yesterday, I thought it was due to Chrome's latest update :-). I actually like the continuous=false behavior. How can we simulate behavior if we need that feature? If I have sometime I will submit a PR for the Readme.

nfriedly commented 7 years ago

You can simulate it by calling .stop() as soon as you get the first final: true result. You'll probably receive some additional results after that, you'll have to just ignore those.

playground commented 7 years ago

@nfriedly what is the PR process? I have a local branch with the update that removes continuous for OPENING_MESSAGE_PARAMS_ALLOWED

nfriedly commented 7 years ago

The process is mainly make sure that the tests pass and the JSDoc is up to date. For that change, you'll also want to remove it from the defaults and update or remove the example. And then submit the PR.

After that, the CLABot will leave a comment with instructions if you haven't yet signed our Contributor License Agreement.

If you're not familiar with PR's in general, Github has pretty good docs: https://help.github.com/articles/creating-a-pull-request/

playground commented 7 years ago

I was having issue pushing up the branch, I may not have the proper permissions.

nfriedly commented 7 years ago

That may be because you're trying to push directly to this repo, where you don't have permissions instead of your own fork (copy) of it where you would.

To resolve this, you should

  1. hit the Fork button at the upper right, that will create a copy of the repo on github that you control.
  2. To update your existing git repo on your computer to point to your fork on github.com, grab the url from your fork (it should look something like git@github.com:playground/speech-javascript-sdk.git) and then run the following command:

    git remote set-url origin <YOUR FORK URL>
  3. After that you'll be able to push changes, and then after that you can
  4. send the Pull Request.
nfriedly commented 7 years ago

Fixed in #47