emofilt
Interface ModificationPlugin

All Known Implementing Classes:
ContourFocusstress, ContourFromStress, ContourUnstress, ContourWordstress, DurAprx, DurationFocusstressedSyls, DurationUnstressedSyls, DurationWordstressedSyls, DurNasal, DurPause, DurVFric, DurVLFric, DurVLStop, DurVowel, DurVStop, F0Mean, F0Range, Jitter, LastSylContour, LevelFocusstress, LevelUnstress, LevelWordstress, PhraseContour, SpeechRate, Variability, VocalEffort, VowelTarget, WaveModel

public interface ModificationPlugin

Interface for the plugin system of emofilt.

Algorithms to modify utterances should implement this.

In order to implement a new modification, authors should

this is an example of the initialisation file:

 name|f0Mean
 label|level
 type|pitch
 defaultRate|100
 minRate|0
 maxRate|400
 step|10
 rateLabel|rate
 tooltip|Change the overall level of pitchcontour in percent.
 Values higher than 100 increase, values lower than that decrease the level.
 button.tooltip|Click the label to reset the values to default.
 # Foreground color 
 controlFG|white 
 # Background color
 controlBG|lightgrey
 

Author:
Felix Burkhardt

Method Summary
 java.lang.String getModificationType()
          Return the type of modification.
 java.lang.String getName()
          return a unique identifier.
 ModificationPanel getPanel()
          Return the panel for the GUI to set values.
 void init(org.apache.log4j.Logger logger, boolean useGui)
          Initialize Modification and give a logger object.
 Utterance modify(Utterance utt, org.jdom.Element emotion, double rate, Language lang)
          Change an utterance according to an emotion-description, perhaps depending on the chosen language.
 org.jdom.Element setEmotion(org.jdom.Element emotion)
          Change the emotion because the user made some change.
 void setGui(org.jdom.Element emotion)
          Change the Gui because the Emotion might have changed.
 void setGuiDefault()
          Set GUI to default value;
 void setPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Set a PropertyChangeListener so emofilt knows about gui-changes.
 java.lang.String toString()
          Return the variables for debugging.
 

Method Detail

init

void init(org.apache.log4j.Logger logger,
          boolean useGui)
Initialize Modification and give a logger object.

Parameters:
logger - A log4j logger.
useGui - Indicate whether the GUI will be displayed.

modify

Utterance modify(Utterance utt,
                 org.jdom.Element emotion,
                 double rate,
                 Language lang)
Change an utterance according to an emotion-description, perhaps depending on the chosen language.

Parameters:
utt - The original utterance.
emotion - The emotion as a jdom element.
rate - The rate of change as a value between 0 and 1. A value of 1 means full effect, 0 no change.
lang - The language of the utterance.
Returns:
The modified utterance.

getModificationType

java.lang.String getModificationType()
Return the type of modification.

Returns:
Either pitch, duration, phonation or articulation.

setGui

void setGui(org.jdom.Element emotion)
Change the Gui because the Emotion might have changed.

Parameters:
emotion - The emotion as a jdom element.

setEmotion

org.jdom.Element setEmotion(org.jdom.Element emotion)
Change the emotion because the user made some change.

Parameters:
emotion - The emotion as a jdom element.
Returns:
The modified emotion as a jdom element.

setPropertyChangeListener

void setPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Set a PropertyChangeListener so emofilt knows about gui-changes.


getName

java.lang.String getName()
return a unique identifier.

Returns:
The name.

toString

java.lang.String toString()
Return the variables for debugging.

Overrides:
toString in class java.lang.Object
Returns:
The values of name, type etc.

setGuiDefault

void setGuiDefault()
Set GUI to default value;


getPanel

ModificationPanel getPanel()
Return the panel for the GUI to set values.

Returns:
The panel for the GUI.