Class Relation

java.lang.Object
com.sun.speech.freetts.Relation
All Implemented Interfaces:
Dumpable

public class Relation extends Object implements Dumpable
Represents an ordered set of Items and their associated children. A relation has a name and a list of items, and is added to an Utterance via an UtteranceProcessor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the relation that groups elements from the Word relation into phrases.
    static final String
    Name of the relation that contains the ordered list of the smallest units of speech (typically phonemes) for the entire utterance.
    static final String
    Name of the relation that contains the description of the syllables for the Utterance.
    static final String
    Name of the relation that contains the syllable structure for the utterance.
    static final String
    Name of the relation that maps fundamental frequency targets to absolute times for wave to be generated from the utterance.
    static final String
    Name of the relation that contains tokens from the original input text.
    static final String
    Name of the relation that contains the ordered list of the units from the unit database that will be used to create the synthesized wave.
    static final String
    Name of the relation that contains the normalized version of the original input text.
  • Method Summary

    Modifier and Type
    Method
    Description
    Adds a new item to this relation.
    appendItem(Item originalItem)
    Adds a new item to this relation.
    void
    dump(PrintWriter pw, int pad, String title)
    Dumps this relation to the print writer.
    Gets the head of the item list.
    Retrieves the name of this Relation.
    Gets the tail of the item list.
    Returns the utterance that contains this relation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TOKEN

      public static final String TOKEN
      Name of the relation that contains tokens from the original input text. This is the first thing to be added to the utterance.
      See Also:
    • WORD

      public static final String WORD
      Name of the relation that contains the normalized version of the original input text.
      See Also:
    • PHRASE

      public static final String PHRASE
      Name of the relation that groups elements from the Word relation into phrases.
      See Also:
    • SEGMENT

      public static final String SEGMENT
      Name of the relation that contains the ordered list of the smallest units of speech (typically phonemes) for the entire utterance.
      See Also:
    • SYLLABLE

      public static final String SYLLABLE
      Name of the relation that contains the description of the syllables for the Utterance. This is typically added to the utterance at the same time as the Segment and SylStructure relations.
      See Also:
    • SYLLABLE_STRUCTURE

      public static final String SYLLABLE_STRUCTURE
      Name of the relation that contains the syllable structure for the utterance.
      See Also:
    • TARGET

      public static final String TARGET
      Name of the relation that maps fundamental frequency targets to absolute times for wave to be generated from the utterance.
      See Also:
    • UNIT

      public static final String UNIT
      Name of the relation that contains the ordered list of the units from the unit database that will be used to create the synthesized wave.
      See Also:
  • Method Details

    • getName

      public String getName()
      Retrieves the name of this Relation.
      Returns:
      the name of this Relation
    • getHead

      public Item getHead()
      Gets the head of the item list.
      Returns:
      the head item
    • getTail

      public Item getTail()
      Gets the tail of the item list.
      Returns:
      the tail item
    • appendItem

      public Item appendItem()
      Adds a new item to this relation. The item added does not share its contents with any other item.
      Returns:
      the newly added item
    • appendItem

      public Item appendItem(Item originalItem)
      Adds a new item to this relation. The item added shares its contents with the original item.
      Parameters:
      originalItem - the ItemContents that will be shared by the new item
      Returns:
      the newly added item
    • getUtterance

      public Utterance getUtterance()
      Returns the utterance that contains this relation.
      Returns:
      the utterance that contains this relation
    • dump

      public void dump(PrintWriter pw, int pad, String title)
      Dumps this relation to the print writer.
      Specified by:
      dump in interface Dumpable
      Parameters:
      pw - the output stream
      pad - the padding
      title - the title for the dump