apinge / MeloTTS.cpp

A lightweight pure C++ Text-to-Speech (TTS) pipeline with OpenVINO, supporting mixed English and Chinese languages.
Apache License 2.0
16 stars 4 forks source link

tones in English are incorrect #2

Closed apinge closed 2 weeks ago

apinge commented 3 weeks ago

The tones_list (in https://github.com/apinge/MeloTTS.cpp/blob/develop/src/tts.cpp#L45) is not correct when using English.

For example, text = "machine learning"

In C++ version now

phones_list:_ m ah sh iy n l er n ih ng _
tones_list:0 0 1 0 2 0 0 2 0 1 0 0
word2ph:1 5 5 1

In python version in the same step is

(Pdb) phone
['_', 'm', 'ah', 'sh', 'iy', 'n', 'l', 'er', 'n', 'ih', 'ng', '_']
(Pdb) tone
[0, 7, 8, 7, 9, 7, 7, 9, 7, 8, 7, 0]
(Pdb) word2ph
[1, 5, 5, 1]
apinge commented 2 weeks ago

fixed in https://github.com/apinge/MeloTTS.cpp/commit/241fb3b5bf07f919f0eb535a3a1da53fcf5074c0