New command- announce (with speech!)

Oct 17, 2009 at 11:04 PM

Hi All,

Building on the msgboxrich command, I've added a new command to the VmcController: "announce". The syntax is identical to msgboxrich, with one additional parameter- an SSML string to speak. For example:

http://host:port/announce "Message Caption" "Message Text" 5 "OK" "nonmodal" "\\picture\to\show\in\message.jpg" "<speak version='1.0' xml:lang='en-US'>Message to Speak</speak>"

This will show a rich message box with the desired text. Then, if the host or extender is not playing media, will speak the message too using the system's default voice. I use this a Media Center alarm clock- to tell us what the weather is when we wake up using the Weather Underground service.

The source code, free for noncommercial use at your own risk, will be posted shortly to the source code section. Enjoy!

-James

Developer
Oct 18, 2009 at 12:08 PM

sounds interesting. i'd like to integrate it in the future. but at the moment there are a lot o other issues. perhaps tony might integrate it into the current version.

primary goal for me is to fix the Win 7 problems. thx for the code and your work.

Coordinator
Oct 19, 2009 at 5:39 PM
Edited Oct 19, 2009 at 6:14 PM

Sounds very cool. Thought: Why force the user to enter the xml in the voice string ("<speak version='1.0' xml:lang='en-US'>Message to Speak</speak>")? Would this ever vary? If not wouldn't it be easier to have the code build the xml and just have the user enter something like "Message to Speak"? 

Escaping the full xml string is going to be a pain for anyone using the html interface and just awkward for anyone using the socket interface.

Also might be worth it to have two commands - one to fully specify the xml (and thus be able to change the language, etc) and one that is simple and just takes the text.
Oct 24, 2009 at 9:14 PM

 

Did think about the escaping problem. Left it as XML because for my needs, I do need to be able to have other XML in the string (i.e. to specify breaks, speed, inflection etc). Probably the easiest way to do it is to have it just speak the 'message' text if the final parameter is left blank.
Regarding Win7, I have tried with no luck to get the EPG stuff working in Win 7 (though with it commented out, VMCController works great). I am able to browse the EPG using the browse tool, but none of the methods seem to return any data. I remember reading somewhere that this was due to licensing issues.
-James

Gave some thought to the escaping problem. Left it as XML because for my needs, I do need to be able to have other XML in the string (i.e. to specify breaks, speed, inflection etc). Probably the easiest way to do it is to have it just speak the 'message' text if the final parameter is left blank.

Regarding Win7, I have tried with no luck to get the EPG stuff working in Win 7 (though with it commented out, VMCController works great). I am able to browse the EPG using the browse tool, but none of the methods seem to return any data. I remember reading somewhere that this was due to licensing issues.

-James

 

Developer
Oct 24, 2009 at 10:14 PM

afaik the epg stuff changed on Win 7. due the fact that all the EPG functions are using undocumented API calls this could break with every release or any update.
but it's on my todo list. but at the moment i don't use Media Center for watching tv.  this it can take a while until i'll take a look.

there are methods using the EPG data in in the SDK. but afaik they can only be called  x times a day and they won't display all desired data. but i could be wrong here.