07.12.2016, 19:20
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.
I like to use the dutch language.
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.