def syllables2Lyrics(syllables): listWords = [] for syllable in syllables: # word of only one syllable word, dummy = createWord([], syllable) listWords.append(word) Phonetizer.initLookupTable(True, 'phonemeMandarin2METUphonemeLookupTableSYNTH') # load phonetic dict Phonetizer.initPhoneticDict('syl2phn46.txt') ## 3) create lyrics # here is called Syllable.expandToPhonemes. lyrics = Lyrics(listWords) return lyrics