Speech recognition library issues (P5.speech)

The stop() method is not working in my scetch. The console throws out this message:
sketch.js:28 Uncaught TypeError: myRec.stop is not a function
and it doesn’t matter where I’m using it inside the scetch, the result is the same.
What I want to do is to stop the recording when the video starts playing.
capture
(Also, as you can see in the screenshot, there are some cases when the video playback doesn’t seem to work either. )
Here is the js file: scetch.js
And this is the page itself: dont_pick_a_fight

Does anybody have a solution for this? :smiley:

1 Like

no,
https://idmnyu.github.io/p5.js-speech/#reference :
say

p5.Speech

methods

  • stop()

p5.SpeechRec

methods

  • start()

but there is no stop() method for this
so the error you get is correct.

sorry, i play only the simple example
https://editor.p5js.org/kll/sketches/wRr-LNQEB

3 Likes