Hello Herman,
Thanks for your thorough response.
This is going to be fun!
Grover
From: Herman van den
Bergen [mailto:psytek@xxxxxxxx]
Sent: Wednesday, January 26, 2005
3:40 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Speech
interface with AB
Hello Grover,
I have been using Voice reporting for AmiBroker,
the TWS and the
Trade-Automation module extensively in real-time
trading. To distinguish
between them i use a different voices for each
sources , i.e. male, female,
or British, etc. Below is some code to get you
started. To create the verbal
messages go to: http://www.research.att.com/projects/tts/demo.html
// the ParamTriggers are for testing only
Buy = ParamTrigger("Buy","Sound
Buy");
Sell = ParamTrigger("Sell","Sound
to Sell");
Short = ParamTrigger("Short","Sound
to Short");
Cover = ParamTrigger("Cover","Click
to Cover");
// You can also amot the code above and click on
your arrows on you chart.
// At the head of your code:
SetBarsRequired(999999,999999);
LastSoundFile =
"";
SoundFile
= "";
//At the end of your code:
//////////////////////////// Voice Reports
/////////////////////////////
// at this point the code will Voice any message
pointed to by SoundFile, or
no sound if it is empty
CursorIndex = SelectedValue(BarIndex());
AlertType =
ParamList("Audio Alerts","Off|Voice|Beeps",1);
// Add more ifs, consider priority as only one
sound can be played at a
time.
if( Buy[CursorIndex] )
SoundFile = "Buy.wav";
else if( Sell[CursorIndex] ) SoundFile =
"Sell.wav";
else if( Cover[CursorIndex] ) SoundFile =
"Cover.wav";
else if( Short[CursorIndex] ) SoundFile =
"Short.wav";
LastSoundFile =
StaticVarGetText("LastSoundFile");
if( SoundFile != LastSoundFile )
{
SoundPath =
"SOUND C:\\Program Files\\AmiBroker\\SoundFiles\\";
if(AlertType=="Beeps" AND SoundFile != "" ) Soundfile =
"Ding.wav";
if(SoundFile !=
"" AND AlertType != "Off") AlertIf(BarIndex()==0,
SoundPath+SoundFile, SoundFile,0,0,1000000);
StaticVarSetText("LastSoundFile", SoundFile );
}
-----Original Message-----
From: Grover Yowell [mailto:gyowell@xxxxxxxxxxxx]
Sent: Tuesday, January 25, 2005 11:52 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Speech interface with AB
Hi,
I have been a very satisfied Amibroker user for
over a year now. I am
running the latest Beta release 4.68.2 on Windows
XP.
At this point, I would like to be able to announce
alerts by speech using
the text to speech capabilities of XP, or by
putting alerts on the clipboard
and reading them with third party software such as
Speakonia.
It is not obvious to me how to do this with the
Alertif command in AFL.
From the Help file, Alertif contains a
Command string which supports:
SOUND the-path-to-the-WAV-file
EMAIL
EXEC the-path-to-the-file-or-URL
But AFL commands are not included in the above
list. If AFL commands were
included in this list, I could simply use the
ClipboardSet command and send
the Alert message off to the Clipboard to be
announced by voice. Could
someone please get me started in the right
direction on this.
The objective is to be able to announce alerts by
speech.
TIA,
Grover
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
Check
AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links