Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sonos TTS
#1
An interesting read on implementing TTS on sonos.

http://www.nooganeer.com/his/projects/ho...nos-speak/
|Z-Wave|Sonos|Tivo|Hue|Plex|Roku|MyMovies|Echo|
Nest|Harmony|Neeo|LG TV|Smarthings|
Reply
#2
We could do it easier than that really. We already have the ability to turn test into a playable WAV file. Our Speech II TTS driver uses that scheme. It just plays it via a local audio output.

It wouldn't be too difficult (for me) to create a driver that accepts text and drops it into a WAV of a given name in some target directory.

Though, given that the existing TTS driver can output to an audio output, and the Sonos has an audio input, and I think that the audio sent to the input of any Sonos can be sent to the others (right?), all you'd really need is one Sonos close enough to the server to connect to its audio inputs and you'd be done.

That's the theory anyway.
Dean Roddey
Software Geek Extraordinaire
Reply
#3
The audio input is only on the connect and connect amp, the play series doesn't have it. whether it's done with switching inputs or a wav file the key would be handling the pausing, playing and unpausing aspect, caching files to be called later etc...
|Z-Wave|Sonos|Tivo|Hue|Plex|Roku|MyMovies|Echo|
Nest|Harmony|Neeo|LG TV|Smarthings|
Reply
#4
Careful with this, the Google Text To Speech service now has captcha. I used to use it. I haven't had TTS for about 6 months because google kicked everyone out.

It would be nice if CQC could convert TTS to WAV/MP3. My CQC server doesnt support audio.
--Kill all the serial ports--
Reply
#5
i just used some free utilities.

VBCableDriver - creates loopback audio driver

edcast - stream creator thingy

lame - mp3 encoder

icecast - streaming server

all that I do is create a continuous live stream using those tools, then add a favorite streaming station in sonos with that URL.

for TTS announcements, switch to the favorite station, it plays the announcement, and can switch back.

total delay is maybe 2 or 3 seconds.

easy, free, works.

edit: the tools to do this are all on my FTP site, so if someone wants to give it a go PM me for access.

edit 2: in the Sonos controller, Manage -> Add Radio Station / provide localhost URL and name. it shows up under Radio by TuneIn -> My Radio Stations. add it to Sonos Favorites from there.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#6
This is very interesting can you provide a basic flow of how this all fits together?

Do you have the wave file looping and broadcasting all the time or do you drop one in depending on the situation?

-Ben
Reply
#7
this is from wuench using a Connect with the LineIn:

Code:
/ Check if Source is LineIn
If Not System::Equals($(Sonos-Upstairs.CurTrackURI), x-rincon-stream:RINCON_xxxxx, Case)
   // Save Off Current URI
   LocalVars::SetVariable(LVar:TrackURI, $(Sonos-Upstairs.CurTrackURI))
   // Switch to Line In
   Devices::FieldWrite(Sonos-Upstairs.InvokeCmd, SetTransURI:"x-rincon-stream:..., False)
   Devices::FieldWrite(Sonos-Upstairs.Transport, Play, True)
End
// Speak text passed as argument 1
Devices::FieldWrite(Speech.SayText, %(LVar:CQCActParm_1), False)
Devices::WaitFieldValue(Speech.SpeechActive, False, Equal, 30000)
If LocalVars::Exists(LVar:TrackURI)
   // Switch Input Back to Original URI
   Devices::FieldWrite(Sonos-Upstairs.InvokeCmd, SetTransURI:"%(LVar:TrackURI)..., False)
   Devices::FieldWrite(Sonos-Upstairs.Transport, Play, True)
End

for the stream, you can grab your TTS stream URI by manually starting it and grabbing the information from the driver to use where applicable. to start the stream, you can use the new PlayFavorite command, so InvokeCmd PlayFavorite:TTS or whatever youve named your favorite.

but instead of playing mp3/wav files, just write to the SayText field for the TTS driver. make sure to account for the delay if you use the stream.
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply
#8
Got it, now to connect the dots...

Thanks!
Reply
#9
we need a hangout on this.
------------------------------------
Devices I'm phasing out: ISY, NuVo
My vlogs: https://www.youtube.com/c/IVBsHomeAutomation
Reply
#10
i can demo my setup, maybe next weekend?
do the needful ...
Hue | Sonos | Harmony | Elk M1G // Netatmo / Brultech
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  New Sonos amp Dean Roddey 3 4,023 09-06-2018, 09:57 PM
Last Post: Dean Roddey
  Sonos going public? Dean Roddey 0 2,147 07-07-2018, 10:08 PM
Last Post: Dean Roddey
  Scheduling next webinar (Sonos/TTS) IVB 6 2,260 02-04-2018, 10:51 PM
Last Post: IVB
  Uverse and Sonos kblagron 5 2,439 01-20-2017, 11:29 AM
Last Post: Dean Roddey
  Lutron adds support for Alexa and Sonos ControlFreak 2 2,194 12-10-2016, 08:47 AM
Last Post: dgage
  Sonos opens its platform to Spotify Connect and Amazon's Alexa batwater 14 3,907 09-06-2016, 02:41 PM
Last Post: potts.mike
  CQC Media Repo - Sonos potts.mike 15 3,792 03-10-2016, 12:28 PM
Last Post: Dean Roddey
  Sonos Opinions zra 51 8,311 01-30-2016, 06:16 PM
Last Post: jkmonroe
  Question for Sonos Owners jkmonroe 23 6,645 09-27-2015, 11:11 AM
Last Post: kfly
  Sonos - How Are You Doing It? karenlee 32 9,114 08-05-2015, 02:07 AM
Last Post: finish.06

Forum Jump:


Users browsing this thread: 1 Guest(s)