From c245d9ec4bf4ebc2a52997e342b2590acbe4608e Mon Sep 17 00:00:00 2001 From: vansangpfiev Date: Tue, 9 Jul 2024 09:38:54 +0700 Subject: [PATCH] fix: model_path string --- src/audio_engine.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio_engine.cc b/src/audio_engine.cc index bb7c659..238f61f 100644 --- a/src/audio_engine.cc +++ b/src/audio_engine.cc @@ -272,7 +272,8 @@ bool AudioEngine::LoadModelImpl(std::shared_ptr json_body) { } server_map_[model_id].ctx.model_id = model_id; - auto is_success = server_map_[model_id].ctx.LoadModel(model_path.asString()); + auto model_path_str = model_path.asString(); + auto is_success = server_map_[model_id].ctx.LoadModel(model_path_str); if (!is_success) { LOG_ERROR << "Could not load model: " << model_path.asString(); server_map_.erase(model_id);