Plugin TTS

From VoxCommando
Jump to: navigation, search

SEE ALSO: TTS Settings

Go to the main Plugins page.

Go to the complete Plugin List.


Plugin Description

Text-to-Speech actions.

Actions for the TTS plugin

GetLastText

TTS.GetLastText
Returns the last text that was spoken by the TTS plugin. If TTS selected text randomly because of the pipe symbol | it will return whichever string was actually spoken. If TTS plugin has not spoken yet, it will return an error.

SetLang

TTS.SetLang
Used with VoxWav for Android.
Instructs VoxWav to attempt to set the TTS engine to the language specified by the two character Language Code.

  • Parameters: 1
  1. Language Code : en, es, fr, de, pt etc. [string]

SetOutput

TTS.SetOutput
Sets the audio output device to be used for TTS (text to speech).
It will select the first device found with a descriptions that contains <DeviceName>.
If <DeviceName> is an integer it will select by the device number.

  • Parameters: 1
  1. DeviceName : The name of the output device to use for TTS [string]

SetOpacity

TTS.SetOpacity
Set the opacity of the talking head form. 0 = invisible, 100 = opaque.
The talking head must already be visible to use this action.

  • Parameters: 1
  1. Opacity : 0-100 [integer]

SetRate

TTS.SetRate
Adjusts the rate (speed) that the voice will talk at. Valid range is from -10 to +10

  • Parameters: 1
  1. Rate : -10 (slow) to +10 (fast) [integer]

SetTransRGB

TTS.SetTransRGB
The talking head must already be visible to use this action.
Using no parameters will disable transparency.
Setting the RBG colour using the 3 parameters will set the transparency to that colour so any parts of your talking head images that match that colour will become transparent and show whatever is beneath the talking head form.
When using transparent images (gif, png) you must use 0,0,0 (black)

  • Parameters: 0-3
  1. Red : 0-255 [integer]
  2. Green : 0-255 [integer]
  3. Blue : 0-255 [integer]

SetVoiceName

TTS.SetVoiceName
Set the TTS engine to use the voice with the name <VoiceName>.
You can view the available names in the TTS Plugin settings. <VoiceName> can be a substring of the actual TTS voice name.

  • Parameters: 1
  1. VoiceName : <voicename> [string]

SetVoiceNum

TTS.SetVoiceNum
Set the TTS engine to use the voice with the <VoiceNum>th voice. The order of voices can be seen in VoxCommando options.
The number and names of voices may change if you install or uninstall voices.
The first voice in the list will have a number of: 0

  • Parameters: 1
  1. VoiceNum : First voice is 0 [integer]

SetVolume

TTS.SetVolume
Sets the output volume of the TTS voice.

  • Parameters: 1
  1. TTS Volume : <1-100> [integer]

ShowHead

TTS.ShowHead
Show or hide the TTS talking head, depending on whether the param <ShowWindow> is True or False.
If <ShowBorder> is False then the window conatining the head will have no border (frame).

  • Parameters: 1-2
  1. ShowWindow : True=Show, False=Hide [boolean]
  2. ShowBorder : True=Show, False=Hide [boolean]

MoveHead

TTS.MoveHead
Positions the talking head window by specifying the top and left coordinates of the window relative to the top left corder of the screen.
If both Width and Height are specified the window will also be resized accordingly.

  • Parameters: 2-4
  1. Top : [integer]
  2. Left : [integer]
  3. Width : [integer]
  4. Height : [integer]

Speak

TTS.Speak
Speaks the string aloud. VC will choose randomly from multiple phrases separated by the symbol: |

  • Parameters: 1
  1. TTS text : <stringoption1 | stringoption2 | etc. [string]

SpeakSync

TTS.SpeakSync
Same as TTS.Speak, but VC will wait until speaking is complete before continuing to the next action.

  • Parameters: 1
  1. TTS text : <stringoption1 | stringoption2 | etc.> [string]

Speak2Wav

TTS.Speak2Wav
Same as TTS.Speak, but instead of speaking aloud, the speech will be recorded to a wav file.

If PlayWav is true the wav will be played immediately, otherwise the file will be created but not played by VoxCommando.

  • Parameters: 1-3
  1. TTS text : What should the TTS engine say? [string]
  2. Path : Where to save the wav file [string]
  3. PlayWav : True = play the wav file after creating it [boolean]

Stop

TTS.Stop
Interrupts the TTS voice (if it is still speaking). In other words it stops the TTS voice from speaking. Text that has not been spoken yet is discarded.