The accent assignment tree is as mentioned above
(set! int_accent_cart_tree
'
((R:SylStructure.parent.gpos is content)
((stress is 1)
((Accented))
((position_type is single)
((Accented))
((NONE))))
((NONE))))
And you'll need to write a function that generates the F0 targets,
something like
(define (targ_func1 utt syl)
"(targ_func1 UTT ITEM)
Returns a list of targets for the given syllable."
(let ((start (item.feat syl "syllable_start"))
(end (item.feat syl "syllable_end")))
(cond
((string-matches (item.feat syl "R:Intonation.daughter1.name") "Accented")
(list
(list start 110)
(list (/ (+ start end) 2.0) 140)
(list end 100)))
(
;; End of utterance as question
;; target for mid point and high end pont
)
( ;; End of utterance but not question
;; target for mid point and low end pont
))))
The condition (equal? nil (item.next syl)) will be true for the last syllable in the utterance and
(string-matches (item.feat syl
"R:SylStructure.parent.R:Word.last.R:Token.parent.punc") "?")
will be true if there is a question mark at the end of the utterance.
You also need to set up these functions as the intonation method
(voice_ked_diphone)
(Parameter.set 'Int_Method 'General)
(set! int_general_params
(list
(list 'targ_func targ_func1)))
Utterances in DB/festival/utts
Some basic features in features
For more features (or add your own) see Festival manual appendix
Basic command to dump features
dumpfeats -relation Segment -feats .../feats.basic
-output .../durfeats.train .../kdt_[0-3]*.utt
To make a description (there is an example suitable for this feature
list in feats.dur, but when you chaneg the feature list you'll need to
either edit the given description file or, build a new one with the commend
make_wagon_desc durfeats.train durfeats.list durfeats.descYou will need to edit durfeats.desc but hand to change any float valued features into explicit floats (not a list of all their values). This is true for at least the first feature segment_duration which should be
... (segment_duration float) ...To build a tree use wagon as
wagon -desc feats.desc -data feats.train -stop 20 -output dur.treeAnd tres a tree withwagon_test -desc feats.desc -data feats.test -tree dur.treeTo get more help on wagon call it with option -h, for more help still see the description of wagon at this pageIn order to run the generated duration model you'll need a duration module that interprets it and sets up fo rthe voice to use it. Such an example is in durmod.scm
(define (Duration_Simple_Tree utt) "Duration_Simple_Tree utt) predicts Segment durations with a simple CART tree (that returns absolute times in seconds)." (let ((end 0)) (mapcar (lambda (s) (let ((dur (wagon_predict s simple_duration_cart_tree))) (set! dur (* (Parameter.get 'Duration_Stretch) dur)) ; (format t "%s %f\n" (item.name s) dur) (set! end (+ dur end)) (item.set_feat s "end" end) )) (utt.relation.items utt 'Segment)) utt)) (voice_ked_diphone) (Parameter.set 'Duration_Method Duration_Simple_Tree) (set! simple_duration_cart_tree (car (load "/home/awb/data/kdt/dur.tree" t)))Though of course you need to load in your tree not mine