When calling Watson TTS, the wav file output is returned as a mono single channel. The Raspberry Pi does not like to play mono files and really wants stereo channels.
Here is the conversion that I need to run to play a wav file from Watson TTS on a Raspberry Pi
/usr/bin/ffmpeg -y -i /tmp/input-mono.wav -ar 48000 -ac 2 /tmp/output-stereo.wav
I built an Exec node to run that command. It works but is a hack. Would be great to have a proper ffmpeg conversion feature in the node-red-contrib-media-util
Note too that -y allows you to replace any existing .wav file
When calling Watson TTS, the wav file output is returned as a mono single channel. The Raspberry Pi does not like to play mono files and really wants stereo channels.
Using ffmpeg, it is easy to convert a mono to a stereo file - https://trac.ffmpeg.org/wiki/AudioChannelManipulation https://ffmpeg.org/ffmpeg-filters.html#Examples-6
Here is the conversion that I need to run to play a wav file from Watson TTS on a Raspberry Pi /usr/bin/ffmpeg -y -i /tmp/input-mono.wav -ar 48000 -ac 2 /tmp/output-stereo.wav
I built an Exec node to run that command. It works but is a hack. Would be great to have a proper ffmpeg conversion feature in the node-red-contrib-media-util Note too that -y allows you to replace any existing .wav file