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);