loading
This will teach you how to code a file so that it says whatever you type!

Step 1: The Code

1: Make a new file in notepad
2: Paste the code
3: save as 'Talk.bat'




Code:
@echo off
@mode con cols=55 lines=10
title Talk
color A
:st
echo Type what you would like the program to say
set /p command=
cls
cd "%userprofile%\desk*"
if exist Talk_.vbs del Talk_.vbs
copy NUL Talk_.vbs
cls
ping localhost -n 2 > nul
echo strText = ("%command%")> "Talk_.vbs"
echo Set objvoice = CreateObject("SAPI.SpVoice")>> "Talk_.vbs"
echo ObjVoice.Speak strText>> "Talk_.vbs"
cls
echo Analyzing text input 
echo please wait
ping localhost -n 1 > nul
echo.
echo ²                        ² 0%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²Û                       ² 4%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛ                      ² 9%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛ                     ² 13%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛ                    ² 18%%
ping localhost -n 2 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛ                   ² 22%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛ                  ² 27%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛ                 ² 31%%
ping localhost -n 2 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛ                ² 36%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛ               ² 40%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛ              ² 45%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛ             ² 49%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛ            ² 54%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛ           ² 58%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛ          ² 63%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ         ² 67%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ        ² 72%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ       ² 76%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ      ² 81%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ     ² 85%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ    ² 87%%
ping localhost -n 2 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ   ² 91%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ  ² 93%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ ² 97%%
ping localhost -n 1 > nul
cls
echo Analyzing text input 
echo please wait
echo.
echo ²ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ² 100%%
ping localhost -n 5 > nul
cls
cd "%userprofile%\desk*"
start Talk_.vbs
ping localhost -n 3 > nul
del Talk_.vbs
cd..
cls
goto st
<p>Awesome! I made it but I was wondering if I could customize. I did customize under the startup message and text color, but I was wondering if I could change the </p><p>&Ucirc; s into something else. I tried entering letters and unicode but it all came up wierd.</p>
<p>You can condense the code to the following if you don't want to have to deal with the letter changes:</p><p>@echo off<br>@mode con cols=55 lines=10<br>title Talk<br>color A<br>:st<br>echo Type what you would like the program to say<br>set /p command=<br>cls<br>cd &quot;%userprofile%\desk*&quot;<br>if exist Talk_.vbs del Talk_.vbs<br>copy NUL Talk_.vbs<br>cls<br>ping localhost -n 2 &gt; nul<br>echo strText = (&quot;%command%&quot;)&gt; &quot;Talk_.vbs&quot;<br>echo Set objvoice = CreateObject(&quot;SAPI.SpVoice&quot;)&gt;&gt; &quot;Talk_.vbs&quot;<br>echo ObjVoice.Speak strText&gt;&gt; &quot;Talk_.vbs&quot;<br>cls</p><p>cd &quot;%userprofile%\desk*&quot;<br>start Talk_.vbs<br>ping localhost -n 3 &gt; nul<br>del Talk_.vbs<br>cd..<br>cls<br>goto st</p>
<p>Hey, thanks for sharing this code. But I keep getting the error that &quot;the file talk_.vbs was not found&quot;. Any help?</p>
<p>Make sure that the talk_.vbs file is being created and searched for in the same directory. If you are using a computer that doesn't recognize either the %userprofile% command or the desk* command you can manually change the code from cd &quot;%userprofile%\desk*&quot; to the directory of where you want the file to be stored. For example it could be changed to cd &quot;C:\Users\YourUsername\MyDocuments&quot;.</p><p>Let me know if that helps at all.</p><p>Good Luck!</p>
<p>Hi I am looking for someone to customize the open source Mary TTS software for me. Please can you advise if you do similar type of work or are aware of anyone that does? Thank you. </p>
<p>What kind of customization are you looking for?</p>
<p>It works! Thanks a lot. I made a little modification BTW.</p><p>To save the audio output (in .wav), replace the following 2 lines:</p><p>echo Set objvoice = CreateObject(&quot;SAPI.SpVoice&quot;)&gt;&gt; &quot;Talk_.vbs&quot;<br>echo ObjVoice.Speak strText&gt;&gt; &quot;Talk_.vbs&quot;</p><p>with these codes:</p><p>echo Dim objstream, objvoice &gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo Set objstream = CreateObject(&quot;SAPI.SpFileStream&quot;) &gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo objstream.Format.Type = 39 &gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo objstream.Open &quot;objstream.wav&quot;, 3 &gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo Set objvoice = CreateObject(&quot;SAPI.SpVoice&quot;)&gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo Set objvoice.AudioOutputStream = objstream &gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo ObjVoice.Speak strText &gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo objstream.Close &gt;&gt; &quot;Talk_.vbs&quot;</p><p>I use 39 for the speech file stream format, which is 48kHz 16bit stereo. For other SAPI5 format type, check out this link:</p><p>https://msdn.microsoft.com/en-us/library/ms720595(...</p>
<p>It cant pronounce roflcopter correctly</p>
<p>The following will let you say something as a parameter (e.g. Talk &quot;Hello! How are you!&quot;)</p><p>@echo off</p><p>@mode con cols=55 lines=10</p><p>title Talk</p><p>color A</p><p>:st</p><p>cls</p><p>cd &quot;%userprofile%\desk*&quot;</p><p>if exist Talk_.vbs del Talk_.vbs</p><p>copy NUL Talk_.vbs</p><p>cls</p><p>ping localhost -n 2 &gt; nul</p><p>echo strText = (&quot;%~1&quot;)&gt; &quot;Talk_.vbs&quot;</p><p>echo Set objvoice = CreateObject(&quot;SAPI.SpVoice&quot;)&gt;&gt; &quot;Talk_.vbs&quot;</p><p>echo ObjVoice.Speak strText&gt;&gt; &quot;Talk_.vbs&quot;</p><p>cls</p><p>cd &quot;%userprofile%\desk*&quot;</p><p>start Talk_.vbs</p><p>ping localhost -n 3 &gt; nul</p><p>del Talk_.vbs</p><p>cd..</p><p>cls</p>
<p>hi there.. is there any way that I could change to other language and convert the audio to MP3..</p>
<p>thank you so much it works great </p>
<p>But how to use this..just run the Talk.bat file? am just getting a screen with the text i typed and no voice?</p>
<p>I have no idea on how to use this</p>
<p>Are there any consumer ready t-t-s programs that allow you to shift between voices and modulations, speeds and timbres? I've been using open-source apps and FL Studio for a while, but perhaps, before I get to construction, what I need might exist.<br>@noobular</p>
Hello, could you make the voice program speak with an British accent...preferably a woman's voice?
The language and accent that it speaks in is on your end of the bargain. To access what voices you can change it to, go to Control Panel/Speech Recognition/ and on the left it should say &quot;text to speech&quot;. There it should open a properties box where you can change the voice, speed and other details. To download more voices, see <a href="http://www.microsoft.com/en-us/download/details.aspx?id=10121" rel="nofollow">here</a>.
Thanks so much for your reply! I was also thinking about making an app and embedding this type of code into the program. I'll have a look into your download link too:-)
Hello, I have something like this in my &quot;Mega_Menu&quot; file and I would like to congratulate you on making one. <br> <br>This is overall a good instructable and I would like to read more in the future.
I haven't tried it in any other languages but if you have a specific language you want me to make it in just tell me and I'll do it! I would also be great if you followed me :)
I tried this code and my kids and I had some fun! Good project!
Thanks! Where did you see this instructable posted? It isn't entered in any contests or anything... At least I know that its being viewed! :)
cool
Thanks! Did you try it out?

About This Instructable

19,916views

19favorites

License:

Bio: Electrical Engineering Major
More by searx:Sonar Collar for Blind Dogs Dog Mood Detector (Raspberry Pi) Running Videos on a TI84 Calculator 
Add instructable to: