ttslearn.tacotron.frontend.openjtalk.pp_symbols

ttslearn.tacotron.frontend.openjtalk.pp_symbols(labels, drop_unvoiced_vowels=True)[source]

Extract phoneme + prosoody symbol sequence from input full-context labels

The algorithm is based on [Kurihara 2021] 1 with some tweaks.

Parameters
  • labels (HTSLabelFile) – List of labels

  • drop_unvoiced_vowels (bool) – Drop unvoiced vowels. Defaults to True.

Returns

List of phoneme + prosody symbols

Return type

list

In [1]: import ttslearn

In [2]: from nnmnkwii.io import hts

In [3]: from ttslearn.tacotron.frontend.openjtalk import pp_symbols

In [4]: labels = hts.load(ttslearn.util.example_label_file())

In [5]: " ".join(pp_symbols(labels.contexts))
Out[5]: '^ m i [ z u o # m a [ r e ] e sh i a k a r a # k a [ w a n a k u t e w a # n a [ r a ] n a i # n o [ d e ] s u $'
1

K. Kurihara, N. Seiyama, and T. Kumano, “Prosodic features control by symbols as input of sequence-to-sequence acoustic modeling for neural tts,” IEICE Transactions on Information and Systems, vol. E104.D, no. 2, pp. 302–311, 2021.