General EQWatcher Concepts > Venturing into the Unknown  > Text-to-Speech


List of commands

IsTTS()

LoadPG(string filename)

Speak(string tospeak)

SpeakSync(string tospeak)


IsTTS() command

Checks if Text-to-Speech is available

Return value

boolean value, true (1) if yes, false (0) if not.

Example

// This alias says you have TTS if you ask it...

alias("Do I have TTS?")
{
  if (IsTTS()==true)
  {
    SpeakSync("You have text to speech");
  }
}


LoadPG(string filename) command

Loads a pronunciation guide file

Return value

none

Parameters

filename

Path and filename of the file, relative to the EQWatcher Advanced directory (you may use relative or absolute paths)

Example

// This alias loads a custom pronunciation guide

public string PGName;
alias("load pg \"@PGName@\"")
{
  LoadPG(PGName);
}
 


Speak(string tospeak) command

Speaks some text asynchronously (may be interrupted by other speech. asynchronous TTS and .WAVs will overlap)

Return value

none

Parameters

tospeak

Text to speak

Example

// This alias speaks some text asynchronously

public string ToSpeak;
alias("speak \"@ToSpeak@\"")
{
  Speak(ToSpeak);
}
 


SpeakSync(string tospeak) command

Speaks some text synchronously (will not be interrupted or overlapped)

Return value

none

Parameters

tospeak

Text to speak

Example

// This alias speaks some text synchronously

public string ToSpeak;
alias("speak \"@ToSpeak@\" sync")
{
  SpeakSync(ToSpeak);
}