Sending wav File to rhasspy client

I would like to send a wav file to one of my zeros (Alarm) with node red.
I can do this with curl:
curl -X POST “http://10.2.30.1:12101/api/play-wav” -H “Content-Type: audio/wav” --data-binary @"/home/kaykoch/beep.wav"

I tried it with node red:


[{“id”:“193b6f2e.e444e1”,“type”:“http request”,“z”:“eefcaba0.cea7d8”,“name”:"-> Wohnzimmer",“method”:“POST”,“ret”:“bin”,“paytoqs”:false,“url”:“http://10.2.30.1:12101/api/play-wav",“tls”:"",“persist”:false,“proxy”:"",“authType”:"",“x”:680,“y”:1060,“wires”:[[]]},{“id”:“5d7e7c8d.179844”,“type”:"file in”,“z”:“eefcaba0.cea7d8”,“name”:"",“filename”:"/data/beep.wav",“format”:"",“chunk”:false,“sendError”:false,“encoding”:“none”,“x”:480,“y”:1100,“wires”:[[“b1eeeb0f.064a48”,“193b6f2e.e444e1”]]},{“id”:“6bcc905f.a777”,“type”:“inject”,“z”:“eefcaba0.cea7d8”,“name”:"",“topic”:"",“payload”:"",“payloadType”:“date”,“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“x”:220,“y”:1100,“wires”:[[“5d7e7c8d.179844”]]},{“id”:“b1eeeb0f.064a48”,“type”:“debug”,“z”:“eefcaba0.cea7d8”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“x”:670,“y”:1140,“wires”:[]}]

The wav file is recognized, but no sound at zero.
file-in sends wav as single buffer object to /api/play-wav

may you help me?

Does your flow set the Content-Type header? If it’s not set to audio/wav, Rhasspy will interpret the incoming data as a URL and try to download it before playing.

1 Like

Thats it. Thank you.

1 Like