Drag[en]gine Script Module DragonScript Script API  1.0
Voice Class Reference

Voice. More...

Inheritance diagram for Voice:

Classes

class  PhonemeChain
 Chain source. More...
 

Public Member Functions

void addPhoneme (VoicePhoneme phoneme)
 Add phoneme. More...
 
void addSpeakPhoneme (int ipa)
 Add phomeme to speak. More...
 
void addSpeakPhoneme (int ipa, int hold)
 Add phomeme to speak. More...
 
void addSpeakPhoneme (int ipa, int hold, float pause)
 Add phomeme to speak. More...
 
Synthesizer createSynthesizer ()
 Create synthesizer from announcer definition. More...
 
void forEachPhoneme (Block ablock)
 Visit phoneme with block with parameter VoicePhoneme. More...
 
VoicePhoneme getPhoneme (int ipa)
 Get phoneme or null if absent. More...
 
int getPhonemeCount ()
 Number of phoneme. More...
 
VoiceSpeakPhoneme getSpeakPhonemeAt (int index)
 Get phoneme to speak at index. More...
 
int getSpeakPhonemeCount ()
 Number of phoneme to speak. More...
 
float getSpeakPhonemePlayTime ()
 Calculate play time in seconds required to speak all phoneme. More...
 
bool hasPhoneme (int ipa)
 Phoneme is present. More...
 
void initVoice ()
 Init voice. More...
 
Voice new ()
 Create announcer. More...
 
void playSpeech (Speaker speaker)
 Play prepared speech in speaker. More...
 
void prepareSpeech ()
 Prepare to speak phoneme. More...
 
void removeAllPhoneme ()
 Remove all phoneme. More...
 
void removeAllSpeakPhoneme ()
 Clear phoneme to speak. More...
 
void removePhoneme (int ipa)
 Remove phoneme. More...
 

Detailed Description

Voice.

Play back articial voice using recorded phoneme using a synthesizer.

Author
Roland Pl├╝ss
Version
1.0
Date
2016

Member Function Documentation

§ addPhoneme()

void addPhoneme ( VoicePhoneme  phoneme)

Add phoneme.

§ addSpeakPhoneme() [1/3]

void addSpeakPhoneme ( int  ipa)

Add phomeme to speak.

Parameters
ipaIpa identifier of phoneme to speak.

§ addSpeakPhoneme() [2/3]

void addSpeakPhoneme ( int  ipa,
int  hold 
)

Add phomeme to speak.

Parameters
ipaIpa identifier of phoneme to speak.
holdHold length multiplier if phoneme can be hold.

§ addSpeakPhoneme() [3/3]

void addSpeakPhoneme ( int  ipa,
int  hold,
float  pause 
)

Add phomeme to speak.

Parameters
ipaIpa identifier of phoneme to speak.
holdHold length multiplier if phoneme can be hold.
pausePause in seconds before speaking phoneme.

§ createSynthesizer()

Synthesizer createSynthesizer ( )

Create synthesizer from announcer definition.

§ forEachPhoneme()

void forEachPhoneme ( Block  ablock)

Visit phoneme with block with parameter VoicePhoneme.

§ getPhoneme()

VoicePhoneme getPhoneme ( int  ipa)

Get phoneme or null if absent.

§ getPhonemeCount()

int getPhonemeCount ( )

Number of phoneme.

§ getSpeakPhonemeAt()

VoiceSpeakPhoneme getSpeakPhonemeAt ( int  index)

Get phoneme to speak at index.

§ getSpeakPhonemeCount()

int getSpeakPhonemeCount ( )

Number of phoneme to speak.

§ getSpeakPhonemePlayTime()

float getSpeakPhonemePlayTime ( )

Calculate play time in seconds required to speak all phoneme.

§ hasPhoneme()

bool hasPhoneme ( int  ipa)

Phoneme is present.

§ initVoice()

void initVoice ( )

Init voice.

Call this method after modifying the phoneme. Rebuilds the synthesizer.

§ new()

Voice new ( )

Create announcer.

§ playSpeech()

void playSpeech ( Speaker  speaker)

Play prepared speech in speaker.

Sets the play position and starts playing. Looping is disabled in case set.

§ prepareSpeech()

void prepareSpeech ( )

Prepare to speak phoneme.

Updates synthesizer instance play time and curves. Sets the play time of the synthesizer instance to the play length of the entire speech. Sets all curves to play back the desired phoneme.

§ removeAllPhoneme()

void removeAllPhoneme ( )

Remove all phoneme.

§ removeAllSpeakPhoneme()

void removeAllSpeakPhoneme ( )

Clear phoneme to speak.

§ removePhoneme()

void removePhoneme ( int  ipa)

Remove phoneme.


The documentation for this class was generated from the following file: