<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>tazti Speech Recognition Forums - Off Topic</title>
        <description>If it isnt tazti, it goes here</description>
        <link>http://www.tazti.com/forums/list.php?5</link>
        <lastBuildDate>Sun, 19 May 2013 15:00:16 -0500</lastBuildDate>
        <generator>Phorum 5.2.13</generator>
        <item>
            <guid>http://www.tazti.com/forums/read.php?5,122,122#msg-122</guid>
            <title>Creating your own audio feedback using .VBS scripts (1 reply)</title>
            <link>http://www.tazti.com/forums/read.php?5,122,122#msg-122</link>
            <description><![CDATA[ Now i'm not a scripting guru at all, but i figured some things out that i wanted to share.<br />
I know there are more people here reading this forum that would like some audio feedback while using Tazti.<br />
A way to do this, is to create a Visual Basic Script and have it start the desired program and trigger some form of audio feedback.<br />
Now simply  have Tazti start your .vbs file and presto, your computer talks back at you.<br />
<br />
There are 2 ways that i found to get you audio feedback.<br />
You can either use a small commandline based mediaplayer and have it play a sound file.<br />
Or you can use windows Text To Speech function and have it say whatever you want.<br />
<br />
The way of the mediaplayer definetly gives better sound, but you will have to make an audio file for each and every feedback you want to get.<br />
Where as the TTS (Text To Speech) method is way more flexible.<br />
<br />
For the mediaplayer i downloaded a little program called &quot;wv player&quot;. Just google it, you're sure to find it.<br />
<br />
I'll just provide you with the code to use here, so you can just copy and paste it into a file make the, i think, obvious adjustments and your done.<br />
<br />
So for the WV_Player mediaplayer script:<br />
<br />
<i>Dim oShell<br />
Set oShell = WScript.CreateObject (&quot;WScript.Shell&quot;)<br />
oShell.run &quot;C:\Path\To\Program\Program.exe&quot;, 0, False<br />
oShell.run &quot;C:\Path\To\Mediaplayer\\wv_player.exe C:\Path\To\Mediafile\Audiofile.mp3&quot;, 0, False<br />
Set oShell = Nothing</i><br />
<br />
Copy and paste this into a texteditor and save the file as &quot;MyFile.VBS&quot;<br />
<b>Be carefull here that the extention is in fact .VBS, because notepad would save your file as &quot;MyFile.VBS.txt&quot; and this is not what you want, it won't work.</b> <br />
<br />
Now for the TTS way copy and paste this into a texteditor:<br />
<br />
<i>Dim oShell, Say<br />
Set oShell = WScript.CreateObject (&quot;WScript.Shell&quot;)<br />
oShell.run &quot;C:\Path\To\Program\Program.exe&quot;, 0, False<br />
<br />
Say = &quot;Look, i got my PC talking back at me&quot;<br />
Set sapi=CreateObject(&quot;sapi.spvoice&quot;)<br />
sapi.Speak Say<br />
<br />
Set oShell = Nothing</i><br />
<br />
Just change the text  &quot;Look, i got my PC talking back at me&quot; into whatever you want your script to say.<br />
<br />
Like i said, i'm not a scripting guru, but if you run into trouble i will try to help.<br />
Maybe there are some other people reading this that are scripting guru's and have a better way of doing this or helping other people.<br />
Please let us know, i'm always interrested in learning more.<br />
<br />
I already ran into some trouble with a more advanced script using commandline arguments.<br />
<b>This works great with Tazti API feature.</b> You can create scripts with options and use the API feature to determin what options to use.<br />
<br />
At first this didn't work at all.<br />
The script was work fine, Tazti was working fine. The only thing that wasn't working fine was Tazti and the Script together.<br />
This was because of me NOT being a scripting guru.<br />
<br />
Now scripts are in fact text files with pieces of code. Your computer sees it as text and this text needs to be understood/interpreted.<br />
This is where the commandinterpreter comes in.<br />
With a simple piece of code windows just automaticly knows what to do with it and redirects it to the commandinterpreter.<br />
When it get's more difficult you need to call upon the commandinterpreter yourself and have it run your script.<br />
The commandinterpreter is a program called cscript.exe and it's usually located in C:\WINDOWS\system32<br />
<br />
With simple scripts you can just have Tazti run the .vbs file you created, but when this doesn't work you should have Tazti run it as:<br />
<br />
C:\WINDOWS\system32\cscript.exe C:\Path\To\Myfile\Myfile.vbs<br />
<br />
<br />
Now i'm not sure if anybody is interested in this, but it took me a long time to figure out and i'm proud that it works so i'm gonna bore you with it anyway. If you don't like, just stop reading :D<br />
I created this script file to play my music . What it does is take in artist and albumname as commandline arguments it than starts Winamp and that plays the album i gave as the command argument and it than says: &quot;Now playing music by (artist). From the album (albumname)&quot;<br />
<br />
So this is the code:<br />
<br />
<i>Dim ArgCount, ProCount, Arg, Say, oShell, Sapi<br />
<br />
ArgCount = WScript.Arguments.count<br />
Arg = &quot;&quot;<br />
Say = &quot;Now playing music by &quot;<br />
<br />
<br />
For ProCount = 1 to ArgCount<br />
  Arg = Arg + WScript.Arguments.Item(ProCount-1)<br />
 If WScript.Arguments.Item(ProCount-1) &lt;&gt; &quot;-&quot; Then<br />
  Say = Say + &quot; &quot; + WScript.Arguments.Item(ProCount-1)<br />
 Else<br />
 If WScript.Arguments.Item(ProCount-1) = &quot;-&quot; Then<br />
  Say = Say + &quot;. from the Album, &quot;<br />
 Else<br />
  Wscript.Echo &quot;Usage: Music.vbs Artist - Albumname&quot;<br />
 End If<br />
 End If<br />
 If ProCount &lt; ArgCount Then<br />
  Arg = Arg + &quot; &quot;<br />
 Else <br />
 End If<br />
Next<br />
<br />
Set sapi=CreateObject(&quot;sapi.spvoice&quot;)<br />
sapi.Speak Say<br />
<br />
Arg = &quot;&quot;&quot;Y:\Muziek\CD Albums\&quot; + Arg <br />
Arg = Arg + &quot;&quot;&quot;&quot;<br />
<br />
Set oShell = WScript.CreateObject (&quot;WScript.Shell&quot;)<br />
oShell.run &quot;C:\Winamp\WinAmp.exe &quot;&amp;arg,0, False<br />
<br />
Set oShell = Nothing<br />
Wscript.Quit</i><br />
<br />
The way i have Tazti start this file is using the API function, this starts the script and passes on the correct artist and albumname.<br />
This is the way i start the file:<br />
C:\Windows\System32\Cscript.exe E:\TaztiCommands\Music.vbs Artist - Albumname<br />
<br />
Anyway, once again i hope this is usefull to at least 1 person and i hope it inspires to a whole lot of other ideas.<br />
<br />
Grtz. Machrias<br />
<br />
PS i've noticed that in the text you might see &quot;winking smiley&quot; this is meant to be <b>&quot; )</b> but without the space in between. The forum site sees this combination as a winking smiley.]]></description>
            <dc:creator>Machrias</dc:creator>
            <category>Off Topic</category>
            <pubDate>Sat, 23 Jul 2011 05:37:04 -0500</pubDate>
        </item>
        <item>
            <guid>http://www.tazti.com/forums/read.php?5,5,5#msg-5</guid>
            <title>This is cool software (1 reply)</title>
            <link>http://www.tazti.com/forums/read.php?5,5,5#msg-5</link>
            <description><![CDATA[ This is so easy to use.  I love it!]]></description>
            <dc:creator>adam computes</dc:creator>
            <category>Off Topic</category>
            <pubDate>Thu, 05 Nov 2009 23:03:44 -0600</pubDate>
        </item>
        <item>
            <guid>http://www.tazti.com/forums/read.php?5,4,4#msg-4</guid>
            <title>A Thought (1 reply)</title>
            <link>http://www.tazti.com/forums/read.php?5,4,4#msg-4</link>
            <description><![CDATA[ Why is the sky blue?]]></description>
            <dc:creator>admin</dc:creator>
            <category>Off Topic</category>
            <pubDate>Tue, 20 Jul 2010 00:30:10 -0500</pubDate>
        </item>
    </channel>
</rss>
