marytts.unitselection.select
Interface JoinCostFunction

All Known Implementing Classes:
JoinCostFeatures, JoinModelCost, PrecompiledJoinCostReader

public interface JoinCostFunction

A join cost function for evaluating the goodness-of-fit of a given pair of left and right unit.

Author:
Marc Schröder

Method Summary
 double cost(Target t1, Unit u1, Target t2, Unit u2)
          Compute the goodness-of-fit of joining two units, given the corresponding targets
 void init(java.lang.String configPrefix)
          Initialise this join cost function by reading the appropriate settings from the MaryProperties using the given configPrefix.
 void load(java.lang.String joinFileName, java.lang.String weightsFileName, java.lang.String precompiledCostFileName, float wSignal)
          Deprecated. 
 

Method Detail

cost

double cost(Target t1,
            Unit u1,
            Target t2,
            Unit u2)
Compute the goodness-of-fit of joining two units, given the corresponding targets

Parameters:
t1 - the left target
u1 - the proposed left unit
t2 - the right target
u3 - the proposed right unit
Returns:
a non-negative number; smaller values mean better fit, i.e. smaller cost.

init

void init(java.lang.String configPrefix)
          throws java.io.IOException
Initialise this join cost function by reading the appropriate settings from the MaryProperties using the given configPrefix.

Parameters:
configPrefix - the prefix for the (voice-specific) config entries to use when looking up files to load.
Throws:
java.io.IOException

load

@Deprecated
void load(java.lang.String joinFileName,
                     java.lang.String weightsFileName,
                     java.lang.String precompiledCostFileName,
                     float wSignal)
          throws java.io.IOException
Deprecated. 

Load weights and values from the given file

Parameters:
joinFileName - the file from which to read default weights and join cost features
weightsFileName - an optional file from which to read weights, taking precedence over
precompiledCostFileName - an optional file containing precompiled join costs
wSignal - Relative weight of the signal-based join costs relative to the phonetic join costs computed from the target
Throws:
java.io.IOException