Play Audio TTS via 3.5 mm audio out on Raspberry Pi

This can’t work. The audio node you are using is only ment for playing audio in the browser. That’s why it says that the editor webpage has to be open in the Browser in the node info. For tts it uses the browsers inbuilt tts functionality and doesn’t actually do anything on the machine node-red is running on.
So for local text to speech it will just not work. You will have to use a different solution. You can install node-red-contrib-pico2wave which I just released this week. Just install the node from the palette and follow the instructions in the nodes readme to install the Svox pico tts libraries (this is the former tts engine that was used in android) on Raspberry Pi OS.
Once both the node and the libraries are installed you can generate a tts wav audio file or buffer locally on the machine nodered is running on. Now you can use a node like node-red-contrib-play-sound or something with more advanced features like node-red-contrib-sox-utils (also my node but still in beta so needs to be installed manually) to play the sound locally to the 3.5 mm output.
Hope this helps.

Johannes

1 Like