Export the English TTS model from MeloTTS (#1509)

This commit is contained in:
Fangjun Kuang
2024-11-04 07:54:19 +08:00
committed by GitHub
parent 6ee8c99c5d
commit 4eeb336f59
11 changed files with 369 additions and 26 deletions

View File

@@ -46,8 +46,10 @@ class OfflineTtsVitsModel::Impl {
}
Ort::Value Run(Ort::Value x, Ort::Value tones, int64_t sid, float speed) {
// For MeloTTS, we hardcode sid to the one contained in the meta data
sid = meta_data_.speaker_id;
if (meta_data_.num_speakers == 1) {
// For MeloTTS, we hardcode sid to the one contained in the meta data
sid = meta_data_.speaker_id;
}
auto memory_info =
Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeDefault);