node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

Audio-out not playing any sound on iphone's safari

Open lewildfox opened this issue 7 years ago • 2 comments

Hello,

I have a problem on using audio-out node as a part of node-red-dashboard module. From what I tried, while it depends on language setting on the phone, it can play audio files and text-to-speech on without any problem when using Android's Chrome or Chrome Desktop. But when I tried to open dashboard url on iPhone's Safari, no sound came out at all. Has anyone else encountered this?

Cheers, adibw

What are the steps to reproduce?

What happens?

TTS and audio buffer can be played without any issue on Chrome (Android & Desktop) Audio buffer can be played without any issue on Microsoft Edge, TTS english only TTS and audio buffer is not played on iPhone's safari

What do you expect to happen?

TTS played or audio file played

Please tell us about your environment:

  • [ ] Node-RED-Dashboard version: 2.9.4
  • [ ] Node-RED version: 0.18.7
  • [ ] node.js version:
  • [ ] npm version:
  • [ ] Platform/OS: Bluemix
  • [ ] Browser: Chrome, Edge, Safari

lewildfox avatar Jun 16 '18 16:06 lewildfox

we use the standard speechsynthesis api in html5 - so it ought to be supported but happy to take any advice if anyone cn help debug it. - https://caniuse.com/#search=speechSynthesis

can you share a non-working example flow so we can try to re-create the problem. thanks

dceejay avatar Jun 21 '18 22:06 dceejay

You could try this flow:

[{"id":"7321e34b.790d3c","type":"ui_audio","z":"ec6e1cee.792cd","name":"","group":"28bbcc35.293604","voice":"en-US","always":true,"x":940,"y":4200,"wires":[]},{"id":"c163bdef.39d64","type":"ui_button","z":"ec6e1cee.792cd","name":"","group":"c89ceff3.56265","order":13,"width":"6","height":"1","passthru":false,"label":"Talk to me","color":"","bgcolor":"blue","icon":"","payload":"This is my TTS output!","payloadType":"str","topic":"","x":90,"y":4200,"wires":[["381d1066.9c475"]]},{"id":"ae8c387c.4de8e8","type":"http request","z":"ec6e1cee.792cd","name":"","method":"GET","ret":"bin","url":"","tls":"","x":730,"y":4200,"wires":[["6f3d9cf6.df40c4","7321e34b.790d3c"]]},{"id":"705a44cd.4d300c","type":"change","z":"ec6e1cee.792cd","name":"","rules":[{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":4200,"wires":[["ae8c387c.4de8e8","eb73dc3a.4ffd5"]]},{"id":"6f3d9cf6.df40c4","type":"debug","z":"ec6e1cee.792cd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":950,"y":4260,"wires":[]},{"id":"42ad68b3.8680c8","type":"debug","z":"ec6e1cee.792cd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":4260,"wires":[]},{"id":"eb73dc3a.4ffd5","type":"debug","z":"ec6e1cee.792cd","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":730,"y":4260,"wires":[]},{"id":"381d1066.9c475","type":"google-tts","z":"ec6e1cee.792cd","name":"","inputField":"payload","inputFieldType":"msg","outputField":"payload","outputFieldType":"msg","languageField":"en","languageFieldType":"str","speedField":"1","speedFieldType":"num","x":320,"y":4200,"wires":[["705a44cd.4d300c","42ad68b3.8680c8"]]},{"id":"28bbcc35.293604","type":"ui_group","z":"","name":"Klima","tab":"282e9b88.4be6e4","order":1,"disp":false,"width":"10","collapse":false},{"id":"c89ceff3.56265","type":"ui_group","z":"","name":"Schalten","tab":"282e9b88.4be6e4","order":7,"disp":false,"width":"6","collapse":false},{"id":"282e9b88.4be6e4","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1}]

I am having the same problem. I know that TTS under iOS is not supported by Safari, but MP3 should be fine and this is where I don't understand that it does not work. Google TTS returns a stream with content-type: audio/mpeg, so I would expect it to work, but it doesn't.

Do you know what I am doing wrong or what is wrong with the audio out node?

marcschumacher avatar Oct 22 '18 21:10 marcschumacher