From 9640edec3daaa5189ba39c7363dd17c0288c1e86 Mon Sep 17 00:00:00 2001 From: danemadsen Date: Sun, 28 Jul 2024 10:42:53 +1000 Subject: [PATCH] test2 --- src/phonemizer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/phonemizer.cpp b/src/phonemizer.cpp index 9902984..4e18d49 100644 --- a/src/phonemizer.cpp +++ b/src/phonemizer.cpp @@ -133,9 +133,8 @@ namespace DeepPhonemizer { session_options.SetIntraOpNumThreads(1); session_options.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_ALL); - const char *model_path_cstr = model_path.c_str(); - - session = new Ort::Session(env, model_path_cstr, session_options); + Ort::Session new_session(env, model_path.c_str(), session_options); + session = &new_session; // This cant be done in 1 line on windows for some reason // Load metadata from the model Ort::ModelMetadata model_metadata = session->GetModelMetadata();