# Audio via speaker out

**URL:** <https://discourse.nodered.org/t/audio-via-speaker-out/24915>\
**Category:** Hardware\
**Created:** [15 April 2020 22:23 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915 "2020-04-15T22:23:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![BigWillow](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@BigWillow](https://discourse.nodered.org/u/BigWillow)\
**Post date:** [15 April 2020 22:23 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/1 "2020-04-15T22:23:02Z")

</div>

Hi all  
Having far more trouble than expected trying to install anything to simply play anything out the 3.5mm socket on a pi4 (it will take triggers from a remote MQTT server & just be a trigger to audio converter).  
I have tried about 4/5 modules via the palette manager and all seem to fail to install.  
Running OS 2020-02-13-raspbian-buster-full  
Node Red 1.0.5

Ultimately I would love to use TTS, but these all seem to be browser based. Thats for another day !

Any ideas/recommendations ?  
Thanks

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [15 April 2020 22:39 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/2 "2020-04-15T22:39:03Z")

</div>

The simplest on Pi (3 at least) is to use an exec node with espeak - which you can `sudo apt install espeak`  
(there are some bugs in espeak with various workarounds so you may need to google if it doesn't just work)

```auto
[{"id":"f50c1d7f.e7875","type":"inject","z":"db548bc6.a7bb98","name":"","topic":"","payload":"hello bigwillow","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":660,"y":360,"wires":[["a362c693.9796e8"]]},{"id":"a362c693.9796e8","type":"exec","z":"db548bc6.a7bb98","command":"espeak \"","addpay":true,"append":" \" --stdout | aplay","useSpawn":"false","timer":"","oldrc":false,"name":"","x":820,"y":360,"wires":[[],[],[]]}]

```

---

<div class="post-metadata">

**Author:** ![BigWillow](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@BigWillow](https://discourse.nodered.org/u/BigWillow)\
**Post date:** [16 April 2020 20:46 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/3 "2020-04-16T20:46:10Z")

</div>

@dceejay thanks very much for that, OK not used an EXEC node before, I see how that works.  
The voice is OK but not the best tbh I have tried using some of the other voices too.

IIs there a solution where I could use Watson AI to generate a better voice & play that to the speaker ?  
Thanks

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [16 April 2020 20:50 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/4 "2020-04-16T20:50:32Z")

</div>

No idea. I’ll let you play and experiment

---

<div class="post-metadata">

**Author:** ![BigWillow](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@BigWillow](https://discourse.nodered.org/u/BigWillow)\
**Post date:** [16 April 2020 20:51 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/5 "2020-04-16T20:51:36Z")

</div>

OK cool, will do. Thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![Brew](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brew/32/19776_2.png) [@Brew](https://discourse.nodered.org/u/Brew)\
**Post date:** [18 April 2020 21:04 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/6 "2020-04-18T21:04:08Z")

</div>

This might be worth a look [Create a voice-enabled COVID-19 chatbot using Node-RED](https://developer.ibm.com/tutorials/create-a-voice-enabled-covid-19-chatbot-using-node-red/)

---

<div class="post-metadata">

**Author:** ![BigWillow](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@BigWillow](https://discourse.nodered.org/u/BigWillow)\
**Post date:** [21 April 2020 08:31 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/7 "2020-04-21T08:31:17Z")

</div>

@Brew thanks very much, will do

---

<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:** [20 June 2020 08:31 UTC](https://discourse.nodered.org/t/audio-via-speaker-out/24915/8 "2020-06-20T08:31:21Z")

</div>

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