Add C++ support for MatchaTTS models not from icefall. (#1834)

This commit is contained in:
Fangjun Kuang
2025-02-10 15:38:29 +08:00
committed by GitHub
parent 7d62ccf1fe
commit 9559a10bd3
5 changed files with 61 additions and 7 deletions

View File

@@ -214,7 +214,7 @@ class OfflineTtsMatchaImpl : public OfflineTtsImpl {
}
std::vector<TokenIDs> token_ids =
frontend_->ConvertTextToTokenIds(text, "en-US");
frontend_->ConvertTextToTokenIds(text, meta_data.voice);
if (token_ids.empty() ||
(token_ids.size() == 1 && token_ids[0].tokens.empty())) {