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

@@ -408,10 +408,10 @@ std::string LookupCustomModelMetaData(const Ort::ModelMetadata &meta_data,
// For other versions, we may need to change it
#if ORT_API_VERSION >= 12
auto v = meta_data.LookupCustomMetadataMapAllocated(key, allocator);
return v.get();
return v ? v.get() : "";
#else
auto v = meta_data.LookupCustomMetadataMap(key, allocator);
std::string ans = v;
std::string ans = v ? v : "";
allocator->Free(allocator, v);
return ans;
#endif