Export the English TTS model from MeloTTS (#1509)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user