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

Add Sliding Windows in _g2p_v2 to separate the word segmentation results into Chinese and English segments #8

Closed apinge closed 1 week ago

apinge commented 2 weeks ago

In function _g2p_v2(in chinese_mix.cpp),in order to add pre_merge_for_modify (to regulate the Chinese segmentation results), it is necessary to add a sliding window after the Jieba word segmentation. The sliding window will determine the left and right boundaries of Chinese or English word segmentations in the Jieba result's vector, the Chinese part will serve as the input for pre_merge_for_modify.

apinge commented 1 week ago

fixed in https://github.com/apinge/MeloTTS.cpp/commit/134d3d172a3af418fbd578172405faa8a34f712b