PDA

View Full Version : Interrupting play with home automation announcements



willmeyer
2005-06-17, 08:24
I am using multiple squeezeboxen as a sort of whole-house audio setup. I am trying to configure the ability to add home-automation announcements to the system, temporarily interrupting play. For example, when a phone call comes in, it should temporarily suspend the music and announce it, then resume the music.

I have started to do this by using a java app that talks to the command-line interface, saves off the current playlist, points the player to a generic announcement MP3 file, plays it, then resumes the playlist. I am triggering the java app with Girder, a program which basically hooks up to windows events and stuff. I could also use other things to start the java app to do the interrupt. Does this make sense to anyone as an approach?

What would be better is if I could point the player, instead of to an MP3, to an actual live MP3 stream coming from my PC sound card. In this way, I could get actual specific announcements generated by text-to-speech to play through the stereo. However, I can't seem to figure out a simple way to get a live MP3 stream running off my sound card without setting up a whole streaming server. Any pointers there?

Thanks in advance...

Will

Patrick Dixon
2005-06-17, 09:27
Have you seen/tried Felix's 'Announce' script?

http://www.gwendesign.com/slimserver/dev_software.htm#announcement

I managed to use it to give RAID alerts on a SB2. I'd be interested to hear how you get on, so please keep us informed.

willmeyer
2005-06-17, 09:35
That's cool, actually just what I was doing, though in Java not Perl. Also, I'm trying to make it play a stream, not just a file, and switch back after a defined period of time. This is so I can play audio generated with text-to-speech as the announcement. Basic idea is that the announcement will be something like "new email from XXXX" or whatever, not just a generic one.

Getting the soundcard-to-stream working is the key, seems simple but having a hard time finding the right SW to use to broadcast anything played over the soundcard. I am looking for an icecast client that can do this, if anyone has any pointers definitely let me know. Thannks!

shaboyi
2005-06-19, 03:43
I am not sure this will help - and am probably missing something, but
why do you want to stream from the sound card? As I understand it
most sound cards' output is analog sound. Have you thought of
streaming out over your ethernet card? I know there is software out
there that can do this.

On 6/17/05, willmeyer <willmeyer.1qs4on (AT) no-mx (DOT) forums.slimdevices.com> wrote:
>
> That's cool, actually just what I was doing, though in Java not Perl.
> Also, I'm trying to make it play a stream, not just a file, and switch
> back after a defined period of time. This is so I can play audio
> generated with text-to-speech as the announcement. Basic idea is that
> the announcement will be something like "new email from XXXX" or
> whatever, not just a generic one.
>
> Getting the soundcard-to-stream working is the key, seems simple but
> having a hard time finding the right SW to use to broadcast anything
> played over the soundcard. I am looking for an icecast client that can
> do this, if anyone has any pointers definitely let me know. Thannks!
>
>
> --
> willmeyer
>

willmeyer
2005-06-20, 05:09
I am basically trying to set up an MP3 stream (this would be over ethernet, yes) that contains whatever is being played on the PC, by any app. I tried icecast and simplecast, though there is some lag that means it doesn't work as well as hoped.

Alternatively, I set up a script to use the MS text-to-speech control to generate a WAV of any text I give it, then to take that WAV and convert it to an MP3, then to pass the MP3, with some display text, to the squeezebox. So, I have a script now where I can pass some text and it will show up ont eh squeezebox display, and I'll hear it spoken through the stereo. Neat, huh? ;-)