Skip to main content

Audio

As I have been running my algorithms, I found that sometimes I would like my audio alerts to be more informative about what is going on with my algo. Simple beeps and sound bites afforded with play() method just werent enough and quickly become too repetetive thus loosing its meaning as an alert system. So I implemented a neat little convenience feature to be able to speak certain events out loud. I found it really useful whenever I am away from the computer and my eyeballs were not glued to the screen. This feature uses your desktop's speech synthesis capabilities.

Audio.say#

• parameters

phrase a String utterance to be spoken out loud

• return value: None

if successPhrase will be read out loud through computer speakers
if errorNo action is taken.
Say("My trading alert");

Audio.play#

Play and audio sound.

• parameters

audiosound a String identifying an audio sound. Available sounds must be .wav or .mp3 format and are managed via settings panel.

• return value: None

if successAn audio sound will be played
if errorNo action is taken.
Audio.play("cha-ching.wav");