home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Input / Output interfaces
other Input / Output interfaces
[How To] Control Mediaportal with your voice using WSRmac
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="smnnekho" data-source="post: 632725" data-attributes="member: 18336"><p>Examples:</p><p></p><p>This a Syntax example how to pause the current playback:</p><p></p><p>[CODE]</p><p></p><p><?xml version="1.0" encoding="UTF-16"?></p><p><speechMacros></p><p></p><p> <command></p><p> <listenFor>Pause</listenFor></p><p> <listenFor>Hold ?Playback</listenFor></p><p> <listenFor>Resume ?Playback</listenFor></p><p> <listenFor>Play</listenFor></p><p> <listenFor>I need to pee</listenFor></p><p> <listenFor>?I Returnd from peeing</listenFor></p><p> <sendKeys>{u+0020}</sendKeys></p><p> </command></p><p></p><p></speechMacros></p><p>[/CODE]</p><p></p><p>It is a very simple Keysend macro. Note that "Spacebar" equals to {u+0020} but it is the only exception from the standard sysntax. For the other keys you can just use "a" or "b", {ENTER}, {ESC}, {CTRL} or whatever.</p><p></p><p>Example for Voice Interaction:</p><p></p><p>[CODE]<?xml version="1.0" encoding="UTF-16"?></p><p><speechMacros></p><p> <command></p><p> <listenFor>?Computer, ?Why ?don't ?you say Hi to [...]</listenFor></p><p> <speak>Hi {[...]}. I'm smnnekho's computer</speak></p><p> </command></p><p></p><p></speechMacros> [/CODE]</p><p></p><p>This would allow you to say "why don't you say hi to PERSON or just Computer, Say hi to PERSON and the computer speaks whats in the <speak> tag.</p><p></p><p>Example for RSS Scraping:</p><p></p><p>[CODE]</p><p><?xml version="1.0" encoding="UTF-16"?></p><p><speechMacros></p><p></p><p><command></p><p><listenFor>Was ist los in der Welt?</listenFor></p><p><listenFor>Schlagzeilen von Welt Online</listenFor></p><p></p><p><speak>Aquiring Data...</speak></p><p></p><p><script language="JScript"></p><p><![CDATA[</p><p>var xml_doc = new ActiveXObject("Microsoft.XMLDOM");</p><p>xml_doc.async = false;</p><p>xml_doc.load("http://www.welt.de/?service=Rss");</p><p>var titles = xml_doc.getElementsByTagName("title");</p><p>var descriptions = xml_doc.getElementsByTagName("description");</p><p></p><p>Application.Speak(titles.item(2).text);</p><p>Application.Speak(descriptions.item(2).text);</p><p></p><p>Application.Speak(titles.item(3).text);</p><p>Application.Speak(descriptions.item(3).text);</p><p></p><p>Application.Speak(titles.item(4).text);</p><p>Application.Speak(descriptions.item(4).text);</p><p></p><p>Application.Speak(titles.item(5).text);</p><p>Application.Speak(descriptions.item(5).text);</p><p>]]></p><p></script></p><p></command></p><p></speechMacros></p><p></p><p>[/CODE]</p><p></p><p>This would be me asking for news and let the computer read them back for me. This is another downside: i havent figured out a way to stop a macros execution. So the computer wouldn't stop reading until headline 5 in this example.</p><p></p><p>i solved this by seperating every headline with an additional command like "read headline 2, 3, 4 etc...</p></blockquote><p></p>
[QUOTE="smnnekho, post: 632725, member: 18336"] Examples: This a Syntax example how to pause the current playback: [CODE] <?xml version="1.0" encoding="UTF-16"?> <speechMacros> <command> <listenFor>Pause</listenFor> <listenFor>Hold ?Playback</listenFor> <listenFor>Resume ?Playback</listenFor> <listenFor>Play</listenFor> <listenFor>I need to pee</listenFor> <listenFor>?I Returnd from peeing</listenFor> <sendKeys>{u+0020}</sendKeys> </command> </speechMacros> [/CODE] It is a very simple Keysend macro. Note that "Spacebar" equals to {u+0020} but it is the only exception from the standard sysntax. For the other keys you can just use "a" or "b", {ENTER}, {ESC}, {CTRL} or whatever. Example for Voice Interaction: [CODE]<?xml version="1.0" encoding="UTF-16"?> <speechMacros> <command> <listenFor>?Computer, ?Why ?don't ?you say Hi to [...]</listenFor> <speak>Hi {[...]}. I'm smnnekho's computer</speak> </command> </speechMacros> [/CODE] This would allow you to say "why don't you say hi to PERSON or just Computer, Say hi to PERSON and the computer speaks whats in the <speak> tag. Example for RSS Scraping: [CODE] <?xml version="1.0" encoding="UTF-16"?> <speechMacros> <command> <listenFor>Was ist los in der Welt?</listenFor> <listenFor>Schlagzeilen von Welt Online</listenFor> <speak>Aquiring Data...</speak> <script language="JScript"> <![CDATA[ var xml_doc = new ActiveXObject("Microsoft.XMLDOM"); xml_doc.async = false; xml_doc.load("http://www.welt.de/?service=Rss"); var titles = xml_doc.getElementsByTagName("title"); var descriptions = xml_doc.getElementsByTagName("description"); Application.Speak(titles.item(2).text); Application.Speak(descriptions.item(2).text); Application.Speak(titles.item(3).text); Application.Speak(descriptions.item(3).text); Application.Speak(titles.item(4).text); Application.Speak(descriptions.item(4).text); Application.Speak(titles.item(5).text); Application.Speak(descriptions.item(5).text); ]]> </script> </command> </speechMacros> [/CODE] This would be me asking for news and let the computer read them back for me. This is another downside: i havent figured out a way to stop a macros execution. So the computer wouldn't stop reading until headline 5 in this example. i solved this by seperating every headline with an additional command like "read headline 2, 3, 4 etc... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Input / Output interfaces
other Input / Output interfaces
[How To] Control Mediaportal with your voice using WSRmac
Contact us
RSS
Top
Bottom