Solved Batch file text to speech notifications

January 24, 2012 at 10:43:32
Specs: Windows XP SP3, 4000+ / 2gb DDR
I have a bunch of batch files automating my server, on a few occasions
when a problem happens my batch is setup to do various automated repairs
and then reboot the server. Normally this is not a problem, except when
using my teamspeak 3, server it often means people connected get cut
off without any warning during those cycles. I have setup WAV file playing
now so a SERVER client with voice activation speaks pre defined
notifications over the main channel.

This is not ideal as I would like my BATCH file to be able to make use
of the built in TTS software on my server pc by having messages in
my batch file directly read out for example something like!

if exist "C:\status\unstableFLAG" run TTS echo speak "The Server is now rebooting at %time% their was a problem with %error-flag% we shall be back shortly"

I have searched hi and lo on the Internet for a simple batch method but so
far no luck, I do not need and visual functionality like MSAGENT just a way
to pipe out the TTS directly to AUDIO using the built in windows XP SP3
default TTS voie can this be done please ?

Michelle


See More: Batch file text to speech notifications

Report •


#1
January 24, 2012 at 13:22:43
Hi I just found this AWESOME and it works
http://krolik.net/post/Say-exe-a-si...

http://krolik.net/wsvn/wsvn/public/...

:: Example

@echo off
echo.
SayStatic The time is %time%


Michelle


Report •

#2
January 24, 2012 at 13:54:10
✔ Best Answer
Nice find Michelle - thanks for sharing.


Please come back & tell us if your problem is resolved.


Report •

#3
January 24, 2012 at 14:51:24
Thanks Wahine yeah it took me about 7 hours of searching, it might be a good idea to mirror this because it really works well even reads out variables very handy little tool. I would thank the guy if I had membership their might send him a PM though it's ironic how people write code as a joke software and it turns out really useful isn't it ;)

Michelle


Report •

Related Solutions

#4
January 24, 2012 at 22:32:37
That's pretty cool. ha ha.

Report •

#5
January 25, 2012 at 21:58:58
Yes jowah it is great, because rather than having to encode cumbersome wav files that use a lot of time and space in both encoding them, and storing them now my server can quickly read text directly for service announcments, planned events, so users not in the habit of reading update messages get notified via voice now in the default channel on the hour :)

Thanks Again to Martin who wrote this code xxx


Report •

#6
February 5, 2012 at 14:13:44
I just wanted to add something more here, it seems that Saystatic was giving the wrong %date% format as I am in the UK the %DAY% AND %MONTH% were being given incorectly as it is useful also for giving the DATE I found a piece of code here!
http://www.computing.net/answers/pr...

So this is my amendment to my TIME.BAT file.
Users in other countries may have to swap the A,B,C, vars around also (IF NOT USING SayStatic).

@echo off
SetLocal EnableDelayedExpansion
@For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Month=%%A
Set Day=%%B
Set Year=%%C
Set All=%%A/%%B/%%C
)

:: SayStatic This is a Server Status Message.
SayStatic Today's Date is: %Day%/%Month%/%Year% United Kingdom.
echo Today's Date is: %Day%/%Month%/%Year% UK Format
echo.
echo %All% United Kingdom.
SayStatic The Time is %TIME% Greenwich Meantime.
sleep 16
cls
:end
endlocal

Michelle xxx


Report •


Ask Question