Package com.sun.speech.freetts

Examples of com.sun.speech.freetts.Relation.appendItem()


  // insert initial silence
  Relation segment = utterance.getRelation(Relation.SEGMENT);
  Item s = segment.getHead();
  if (s == null) {
      s = segment.appendItem(null);
  } else {
     s = s.prependItem(null);
  }
  s.getFeatures().setString("name", silence);
View Full Code Here


        Relation relation = utterance.createRelation(Relation.PHRASE);
        Item p = null;
        for (Item w = utterance.getRelation(Relation.WORD).getHead();
      w != null; w = w.getNext()) {
            if (p == null) {
                p = relation.appendItem();
                p.getFeatures().setString("name","BB");
            }
            p.addDaughter(w);
            String results = (String) cart.interpret(w);
           
View Full Code Here

    // Based on this data, create a Unit relation giving the details of the
    // units to concatenate.
  Relation unitRelation = utterance.createRelation(Relation.UNIT);

  for (Item s = segs.getHead(); s != null; s = s.getNext()) {
      Item unit = unitRelation.appendItem();
      FeatureSet unitFeatureSet = unit.getFeatures();
      int unitEntry = s.getFeatures().getInt("selected_unit");

        // The item name is the segment name
      unitFeatureSet.setString("name", s.getFeatures().getString("name"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.