# Error of Speech to Text node

**URL:** <https://discourse.nodered.org/t/error-of-speech-to-text-node/23947>\
**Category:** Developing Nodes\
**Created:** [31 March 2020 07:52 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947 "2020-03-31T07:52:08Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [31 March 2020 07:52 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/1 "2020-03-31T07:52:08Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/d/8df7ac5d4ded2d9302ebb77947cbd732cd201c52.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fda1b3536e9ebda7e76adfec8e5072c5f54c2398.png)  
how to solve this error? Is that api key and url wrong? I can't record my voice .... i using mic from earphone.....

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [31 March 2020 10:11 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/2 "2020-03-31T10:11:59Z")

</div>

Welcome to the forum Ling.

In order for anyone to help you, we wil need to know the name of the speech to text node ou are using. What is the name of the node you are using? It will be called something like 'node-red-contrib-????

It would also be helpful to provide  
1 - the version of NR and node.js (look at node-red startup log)  
2 - platform and os version you are using  
3 - version of the dashboard (if related - also found in startup log)

---

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [31 March 2020 11:03 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/3 "2020-03-31T11:03:58Z")

</div>

![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/9/296e5557b9d90528aec57b6d23b42a6df786a052.png)

 ![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/4/947f4c641fce785c78448b365410ca302faecd25.png)

![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/39c7e3b6449294213d4afee56acbd30c8c4328b7.png)

platform and os version you are using ?? where can i know?

is that node mic not suitable?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [31 March 2020 11:59 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/4 "2020-03-31T11:59:21Z")

</div>

Hi @lingzhongli

given the error is specific to the Watson Speech To Text node, then it may be best to ask its maintainer, @chughts for his input on it.

I doubt anyone else here will be able to help given it is an internal error of that node.

---

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [31 March 2020 12:18 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/5 "2020-03-31T12:18:52Z")

</div>

okey, thank you

---

<div class="post-metadata">

**Author:** ![chughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chughts/32/139_2.png) [@chughts](https://discourse.nodered.org/u/chughts)\
**Post date:** [31 March 2020 13:37 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/6 "2020-03-31T13:37:21Z")

</div>

It looks like the mic node is sending a stream, in which case you will need to set the STT node to streaming mode. if you don't then it is expecting either a buffer or a url. If you are running in streaming mode then you will also need to signal the start and end of the stream.

---

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [1 April 2020 05:24 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/7 "2020-04-01T05:24:40Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/72e02ad485634eedcb5eec9ded18bb63162b9d0b.png)  
thank you, it work..but i want ask the check box i tick is correct or not? got anything need to tick or untick?

---

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [1 April 2020 05:32 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/8 "2020-04-01T05:32:22Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/7/a7949deccb2c8ebbbe1ee37df483fbdce93a6a0d.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b2e01db3501c46578f6f6a200a022470c377f3a.png)

And why it no show the output?? i already tick the "Place output on msg.payload"  
and listening for scoket data mean what?? is that still have error?

---

<div class="post-metadata">

**Author:** ![chughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chughts/32/139_2.png) [@chughts](https://discourse.nodered.org/u/chughts)\
**Post date:** [1 April 2020 08:36 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/9 "2020-04-01T08:36:03Z")

</div>

That means that the node has connected to the STT service via web sockets and is waiting for output from it. If you did not switch off interim results in the start packet then you should see interim results being output. As I said in the earlier post you do need to signal to the node the start and end of the stream.

Try unchecking `Mute in Streaming Mode` to allow the web socket connection / disconnection events to appear in the debug panel.

---

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [1 April 2020 09:23 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/10 "2020-04-01T09:23:09Z")

</div>

unchecking `Mute in Streaming Mode` already...but it no working... and how to end of the stream ?? how i should setting in debug panel?? can debug panel set in stream??

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/78c52b479ff41377580ece48da9114ecfe54b5cd.png)  
And start of the stream is mean like above pic?? set `output payload type` as stream , right?

---

<div class="post-metadata">

**Author:** ![chughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chughts/32/139_2.png) [@chughts](https://discourse.nodered.org/u/chughts)\
**Post date:** [1 April 2020 11:32 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/11 "2020-04-01T11:32:31Z")

</div>

This is a sample flow that I use for regression testing of the streaming functionality of the STT Node. The Start action sends the start packet and initialises the stream. The End action sends the end packet.

```auto
[{"id":"94ab69fb.22f7c8","type":"comment","z":"ca14c9b0.e20598","name":"STT Stream Simulation","info":"","x":158.5,"y":285,"wires":[]},{"id":"661b213a.cbd1d","type":"inject","z":"ca14c9b0.e20598","name":"Start and Audio","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":164,"y":326,"wires":[["f1b15206.1115b","cea2184b.2caf48"]]},{"id":"f1b15206.1115b","type":"http request","z":"ca14c9b0.e20598","name":"","method":"GET","ret":"bin","url":"https://raw.githubusercontent.com/watson-developer-cloud/speech-to-text-nodejs/master/public/audio/english2.g712.wav","tls":"","x":370,"y":300,"wires":[["886d3240.05a8a","e6739c9e.7d35d","80e9ca6a.aa3d78"]]},{"id":"886d3240.05a8a","type":"watson-speech-to-text","z":"ca14c9b0.e20598","name":"","alternatives":1,"speakerlabels":false,"smartformatting":false,"lang":"en-US","langhidden":"en-US","langcustom":"NoCustomisationSetting","langcustomhidden":"NoCustomisationSetting","band":"NarrowbandModel","bandhidden":"NarrowbandModel","password":"","apikey":"","payload-response":true,"streaming-mode":true,"streaming-mute":true,"auto-connect":true,"discard-listening":true,"disable-precheck":false,"service-endpoint":"https://stream.watsonplatform.net/speech-to-text/api","x":598,"y":374,"wires":[["212f2eb2.c5b552"]]},{"id":"212f2eb2.c5b552","type":"debug","z":"ca14c9b0.e20598","name":"Results","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":758,"y":376,"wires":[]},{"id":"e6739c9e.7d35d","type":"function","z":"ca14c9b0.e20598","name":"Bracket Stream","func":"tmpmsg = {\n payload : '{\"action\": \"start\",\"content-type\": \"audio/wav\", \"interim_results\": true}'\n};\n\nnode.send(tmpmsg); \nnode.send(msg);\n\n\n","outputs":1,"noerr":0,"x":560,"y":280,"wires":[["886d3240.05a8a","63adc494.79c7bc"]]},{"id":"a2316acb.394578","type":"inject","z":"ca14c9b0.e20598","name":"End","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":136,"y":433,"wires":[["88720198.d9398"]]},{"id":"88720198.d9398","type":"function","z":"ca14c9b0.e20598","name":"Signal End","func":"msg.payload = '{ \"action\": \"stop\"}';\nreturn msg;\n\n","outputs":1,"noerr":0,"x":384,"y":429,"wires":[["886d3240.05a8a"]]},{"id":"63adc494.79c7bc","type":"debug","z":"ca14c9b0.e20598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":778,"y":320,"wires":[]},{"id":"cea2184b.2caf48","type":"debug","z":"ca14c9b0.e20598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":148,"y":373,"wires":[]},{"id":"80e9ca6a.aa3d78","type":"debug","z":"ca14c9b0.e20598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":360,"y":378,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [2 April 2020 07:31 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/12 "2020-04-02T07:31:43Z")

</div>

how can i run this flow??

---

<div class="post-metadata">

**Author:** ![chughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chughts/32/139_2.png) [@chughts](https://discourse.nodered.org/u/chughts)\
**Post date:** [2 April 2020 10:39 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/13 "2020-04-02T10:39:41Z")

</div>

Are you not able to import it?

---

<div class="post-metadata">

**Author:** ![chughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chughts/32/139_2.png) [@chughts](https://discourse.nodered.org/u/chughts)\
**Post date:** [2 April 2020 10:42 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/14 "2020-04-02T10:42:24Z")

</div>

If you are having difficulty making use of the streaming mic node, there are alternative microphone node-red contributions eg. node-red-contrib-browser-utils.

---

<div class="post-metadata">

**Author:** ![lingzhongli](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lingzhongli/32/20078_2.png) [@lingzhongli](https://discourse.nodered.org/u/lingzhongli)\
**Post date:** [3 April 2020 09:09 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/15 "2020-04-03T09:09:09Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46a645a6e775c46b0e9363d07424393b18859365.png)

it still have `listening for socket data ` ....  
it like no show the output at result node...  
or is the problem of my credentials IBM?

---

<div class="post-metadata">

**Author:** ![chughts](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chughts/32/139_2.png) [@chughts](https://discourse.nodered.org/u/chughts)\
**Post date:** [3 April 2020 09:32 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/17 "2020-04-03T09:32:03Z")

</div>

Your screen shot appears to show the streaming and transcription working. If you expand the output from the `results` debug tab, you should see the transcription, something like:

 ![Screenshot 2020-04-03 at 10.29.39](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/c/2c7dddb2c98cf5fcd08a147c79de23074fa59794.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 June 2020 09:32 UTC](https://discourse.nodered.org/t/error-of-speech-to-text-node/23947/18 "2020-06-02T09:32:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
