I guess an alternative is to only use a sound name in the xAP message and then implement a mapping function in the speech server. Then a simple sound name like 'chime' might be mapped in the server to 'ftp://ha.example.org/sounds/chime.wav'. Humm... the more I think about this the more I like your implementation where the messaging is generic and the server decides how to locate the actual sound media. Nothing there prevents me from making a smarter speech server that can download its own sound files. It makes configuration more complex but keeps the smarts in the speech server. I'm a big fan of making each controller as smart as is practical. OK, you talked me into it
--- In xAP_developer@yahoogroups.com, James <james.traynor@...> wrote:
>
> Hi,
>
> Actually this functionality is included in the latest xAPSpeech. It
> can play a wav file before speech which can be selected from the xAP
> message as well as a default for all messages. Looks like I
> completely missed updating the schema doc, sorry! I have added the
> extra item to the doc on mi4 and xAP wiki which is just a Sound=
> item in the tts.speak message. Only thing to note is the sound name
> should refer to the sound without the file extension
> As you say this kind of this is best handled in a single message and
> not two. A xAP message can contain multiple blocks/sections but
> will only ever be about 1 class.
>
> hth
>
> James
>
> On 30 Apr 2009, at 13:57, mstovenour wrote:
>
> >
> >
> > I have an alerting application where I need a TTS application to
> > play a wav file prior to speaking the text. There are multiple wav
> > files, from a simple chime to a siren, that accompany the text; this
> > rules out hard coding the wav file into the TTS application. Clearly
> > I'll need to build both a new client and TTS application. My
> > question is regarding the schema to use.
> >
> > Is there a single schema that can communicate both speech and wav
> > files? If not, do you think I should extend the tts.speak to include
> > attributes for intro audio files or should I create a totally new
> > schema for the combination (e.g. tts.alert)? I think it is a bad
> > idea to try sending separate messages because UDP does not guarantee
> > sequenced delivery and it would require a complicated client that
> > knows to wait for multiple messages from different schemas. As an
> > alternative, is it possible to encapsulate two different schemas in
> > the same message (e.g. tts.speak and Playlist.Track)?
> >
> >
> >
>