# Speech recognition library issues (P5.speech)

**URL:** <https://discourse.processing.org/t/speech-recognition-library-issues-p5-speech/14014>\
**Category:** Libraries\
**Created:** [September 16, 2019, 3:09pm UTC](https://discourse.processing.org/t/speech-recognition-library-issues-p5-speech/14014 "2019-09-16T15:09:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![feelthemall](https://avatars.discourse-cdn.com/v4/letter/f/ccd318/32.png) [@feelthemall](https://discourse.processing.org/u/feelthemall)\
**Post date:** [September 16, 2019, 3:09pm UTC](https://discourse.processing.org/t/speech-recognition-library-issues-p5-speech/14014/1 "2019-09-16T15:09:58Z")

</div>

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](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/cf1d74878e06e0cf00d5d5664469b17a10e6d4a2.png)  
(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](https://github.com/namedotwhy/dontpickafight/blob/master/sketch.js)  
And this is the page itself: [dont\_pick\_a\_fight](https://namedotwhy.github.io/dontpickafight/)

Does anybody have a solution for this? 😃

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [September 17, 2019, 2:10am UTC](https://discourse.processing.org/t/speech-recognition-library-issues-p5-speech/14014/2 "2019-09-17T02:10:58Z")

</div>

no,  
[p5.speech | Speech synthesis and recognition for p5.js](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

> **[p5.js Web Editor](https://editor.p5js.org/kll/sketches/wRr-LNQEB)**
>
> A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.
