21.03.2017, 10:12
(07.12.2016, 19:20)gjniewenhuijse Wrote: Has anyone a working solution for text to speech (and send it to sonos)?
Before i used: translate.google.com, but now its banned by google.
Code:function sonosSay(ip, lang, speak)
local url = require("socket.url")
local speak = url.escape(speak)
uri = string.format("x-rincon-mp3radio://translate.google.com/translate_tts?tl=%s&q=%s", lang, speak)
upnpavcmd(ip, 1400, 'SetAVTransportURI', '<CurrentURI>'..uri..'</CurrentURI><CurrentURIMetaData/>')
upnpavcmd(ip, 1400, 'Play', '<Speed>1</Speed>')
end
I like to use the dutch language.
Hi,
I am looking into this also...thinking of using VoiceRSS since it will require minimal change to use.
See weblink - http://www.voicerss.org/api/documentation.aspx
I already have my code available to continue playing music/playlist after playing my doorbell sound or tts.
Mvg, B
B