Closed gopalakr closed 6 years ago
I understand the confusing you but item.relation.leafs is doing what its supposed to be doing even if that's not what you want. What I do for the case you want (all the phones in a word) is
(define (allphones_from_word i) (apply append (mapcar item.daughters (item.relation.daughters i 'SylStructure))))
(set! utt1 (SynthText "festival")) (set! w1 (utt.relation.first utt1 'Word))
(allphones_from_word w1) (mapcar item.name (allphones_from_word w1))
item.relation.leafs isn't working for me as expected on my installation.
Eg. For a specific word within an utterance, the command
(item.relation.leafs (utt.relation.first utt1 'Word) 'SylStructure)
is returning all the phonemes through the end of the utterance and not just those in the current word, which I thought was the intended usage of this function.I had to modify the following function in $FESTDIR/lib/festival.scm to make it work as it should (working version is pasted underneath), but wondering if my assumption of the intent of this function is incorrect.