de.dfki.lt.freetts.en.us
Class MbrolaVoice

java.lang.Object
  extended bycom.sun.speech.freetts.Voice
      extended bycom.sun.speech.freetts.en.us.CMUVoice
          extended byde.dfki.lt.freetts.en.us.MbrolaVoice
All Implemented Interfaces:
Dumpable, UtteranceProcessor

public class MbrolaVoice
extends CMUVoice

Defines an unlimited-domain diphone synthesis based voice using the MBROLA synthesis.


Field Summary
 
Fields inherited from class com.sun.speech.freetts.Voice
DATABASE_NAME, DEFAULT_AUDIO_PLAYER, DEFAULT_AUDIO_PLAYER_DEFAULT, FEATURE_JOIN_TYPE, FEATURE_SILENCE, PROP_PREFIX
 
Constructor Summary
MbrolaVoice(java.lang.String databaseDirectory, java.lang.String database, float rate, float pitch, float range, java.lang.String name, Gender gender, Age age, java.lang.String description, java.util.Locale locale, java.lang.String domain, java.lang.String organization, CMULexicon lexicon)
          Creates an MbrolaVoice.
 
Method Summary
protected  UtteranceProcessor getAudioOutput()
          Returns the audio output used by this voice.
 java.lang.String getDatabase()
          Returns the absolute file name of the Voice database this MbrolaVoice uses.
 java.lang.String getMbrolaBase()
          Returns the absolute name of the MBROLA directory.
 java.lang.String getMbrolaBinary()
          Returns the absolute file name of the MBROLA binary.
protected  java.lang.String[] getMbrolaCommand()
          Returns the command line that invokes the MBROLA executable.
 java.lang.String getRenameList()
          Returns the absolute file name of the MBROLA phonetic symbols rename table.
protected  java.net.URL getResource(java.lang.String resource)
          Get a resource for this voice.
protected  UtteranceProcessor getUnitConcatenator()
          Returns the unit concatenator to be used by this voice.
protected  UtteranceProcessor getUnitSelector()
          Returns the unit selector to be used by this voice.
 java.lang.String toString()
          Converts this object to a string
 
Methods inherited from class com.sun.speech.freetts.en.us.CMUVoice
getPhoneFeature, getPitchmarkGenerator, getPostLexicalAnalyzer, getTokenizer, loader, setupFeatureProcessors, setupFeatureSet, setupUtteranceProcessors
 
Methods inherited from class com.sun.speech.freetts.Voice
addFeatureProcessor, allocate, createOutputThread, deallocate, dump, dumpProcessors, endBatch, error, getAge, getAudioPlayer, getDefaultAudioPlayer, getDescription, getDomain, getDurationStretch, getFeatureProcessor, getFeatures, getGender, getLexicon, getLocale, getName, getOrganization, getOutputQueue, getPitch, getPitchRange, getPitchShift, getRate, getRunTitle, getStyle, getUtteranceProcessors, getVolume, getWaveDumpFile, isDetailedMetrics, isDumpRelations, isDumpUtterance, isLoaded, isMetrics, isVerbose, load, log, processNode, processUtterance, setAge, setAudioPlayer, setDescription, setDetailedMetrics, setDomain, setDumpRelations, setDumpUtterance, setDurationStretch, setGender, setLexicon, setLoaded, setLocale, setMetrics, setName, setOrganization, setOutputQueue, setPitch, setPitchRange, setPitchShift, setRate, setRunTitle, setStyle, setVerbose, setVolume, setWaveDumpFile, speak, speak, speak, speak, startBatch, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MbrolaVoice

public MbrolaVoice(java.lang.String databaseDirectory,
                   java.lang.String database,
                   float rate,
                   float pitch,
                   float range,
                   java.lang.String name,
                   Gender gender,
                   Age age,
                   java.lang.String description,
                   java.util.Locale locale,
                   java.lang.String domain,
                   java.lang.String organization,
                   CMULexicon lexicon)
Creates an MbrolaVoice.

Parameters:
databaseDirectory - the directory within the MBROLA directory where the voice database of this voice is located
database - the name of the voice database of this voice
rate - the rate of the voice
pitch - the pitch of the voice
range - the range of the voice
name - the name of the voice
gender - the gender of the voice
age - the age of the voice
description - a human-readable string providing a description that can be displayed for the users.
locale - the locale of the voice
domain - the domain of this voice. For example,
organization - the organization which created the voice
lexicon - the lexicon to use
Method Detail

getUnitSelector

protected UtteranceProcessor getUnitSelector()
                                      throws java.io.IOException
Returns the unit selector to be used by this voice. Derived voices typically override this to customize behaviors.

Overrides:
getUnitSelector in class CMUVoice
Returns:
the unit selector
Throws:
java.io.IOException - if an IO error occurs while getting processor

getMbrolaCommand

protected java.lang.String[] getMbrolaCommand()
Returns the command line that invokes the MBROLA executable. The command will be in the form of:
 {mbrolaExecutable} -e -R {mbrolaRenameList} {mbrolaVoiceDB} 
 - -.raw 


getMbrolaBase

public java.lang.String getMbrolaBase()
Returns the absolute name of the MBROLA directory.

Returns:
the absolute name of the MBROLA directory

getMbrolaBinary

public java.lang.String getMbrolaBinary()
Returns the absolute file name of the MBROLA binary.

Returns:
the absolute file name of the MBROLA binary

getRenameList

public java.lang.String getRenameList()
Returns the absolute file name of the MBROLA phonetic symbols rename table.

Returns:
the absolute file name of the rename table

getDatabase

public java.lang.String getDatabase()
Returns the absolute file name of the Voice database this MbrolaVoice uses.

Returns:
the absolute file name of the Voice database

getUnitConcatenator

protected UtteranceProcessor getUnitConcatenator()
                                          throws java.io.IOException
Returns the unit concatenator to be used by this voice. This method constructs the command line with which the MBROLA binary will be called, and initialises the MbrolaCaller accordingly.

Overrides:
getUnitConcatenator in class CMUVoice
Returns:
the unit conatenator
Throws:
java.io.IOException - if an IO error occurs while getting processor

getAudioOutput

protected UtteranceProcessor getAudioOutput()
                                     throws java.io.IOException
Returns the audio output used by this voice.

Overrides:
getAudioOutput in class CMUVoice
Returns:
the audio output used by this voice
Throws:
java.io.IOException - if an I/O error occurs

getResource

protected java.net.URL getResource(java.lang.String resource)
Get a resource for this voice. Resources for this voice are located in the package com.sun.speech.freetts.en.us.

Overrides:
getResource in class Voice

toString

public java.lang.String toString()
Converts this object to a string

Overrides:
toString in class CMUVoice
Returns:
a string representation of this object