MacroMonkey.com - Home

Automation - Macro - Bot - Scripting system.



Audio Library:

Library to play sound samples.


audio.PlaySound([szFileName], [bLoop])    Play a WAV file specified by “szFileName”. If bLoop is true then sound

loops until stopped with StopSound(). If szFileName file is not found or valid then plays a default sound.

Example:

audio.PlaySound(“music.wav”, true)     Loop WAV file continuously.


audio.StopSound()    Stop all sounds.



Text to Speech:

Interface to Windows API for text to speech output.


speech.Say(szText)Do “Text” string to speech.
speech.Stop()Stop and current playing speech.
speech.Sleep([TimeOut])Sleep until speech if finished. With optional timeout time in seconds (default 30 sec).
speech.Speed()Set speech speed (default 0). Valid range -10 to 10.
info = speech.Voices()Returns a table of voices.

Info table:

    .Index    - Index to voice

    .Description    - Description/Name of voice speech.Voice(Index) Set speech voice by table index.


Example:

speech.Say(“Hello World!”)