Class ContourGenerator

  • All Implemented Interfaces:
    UtteranceProcessor

    public class ContourGenerator
    extends java.lang.Object
    implements UtteranceProcessor
    Calculates the F0 curve for an utterance based on the Black and Hunt article "Generating F0 Contours from ToBI Labels Using Linear Regression," ICSLP96, vol. 3, pp 1385-1388, Philadelphia, PA. 1996.
    • Constructor Summary

      Constructors 
      Constructor Description
      ContourGenerator​(java.net.URL url, float modelMean, float modelStddev)
      Creates a ContourGenerator utterance processor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void parseAndAdd​(java.util.List list, java.lang.String line)
      Parses the line into an F0ModelTerm.
      void processUtterance​(Utterance utterance)
      Generates the F0 contour for the utterance.
      java.lang.String toString()
      Returns the string representation of the object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ContourGenerator

        public ContourGenerator​(java.net.URL url,
                                float modelMean,
                                float modelStddev)
                         throws java.io.IOException
        Creates a ContourGenerator utterance processor.
        Parameters:
        url - source of the data
        modelMean - the average frequency
        modelStddev - the std deviation of the frequency
        Throws:
        java.io.IOException - if an error occurs while loading data
    • Method Detail

      • parseAndAdd

        protected void parseAndAdd​(java.util.List list,
                                   java.lang.String line)
        Parses the line into an F0ModelTerm.
        Parameters:
        list - resulting F0ModelTerm is added to this list
        line - the string to parse
      • toString

        public java.lang.String toString()
        Returns the string representation of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation of the object