[fix] Fix CMM cannot be released

This commit is contained in:
LittleMouse
2025-04-16 18:40:21 +08:00
parent c63bb098e8
commit 8f673e4fef
5 changed files with 6 additions and 11 deletions
@@ -259,9 +259,6 @@ public:
~llm_task()
{
stop();
if (recognizer_stream_) {
recognizer_stream_.reset();
}
buffer_destroy(pcmdata);
}
};
@@ -256,6 +256,7 @@ public:
~llm_task()
{
stop();
if (depth_anything_) depth_anything_->Release();
_ax_deinit();
}
};
+4 -5
View File
@@ -177,9 +177,11 @@ public:
temp_awake_key.close();
std::ostringstream awake_key_compile_cmd;
if (file_exists("/opt/m5stack/scripts/text2token.py"))
awake_key_compile_cmd << "PYTHONPATH=/opt/m5stack/lib/sherpa-onnx/site-packages /usr/bin/python3 /opt/m5stack/scripts/text2token.py ";
awake_key_compile_cmd << "PYTHONPATH=/opt/m5stack/lib/sherpa-onnx/site-packages /usr/bin/python3 "
"/opt/m5stack/scripts/text2token.py ";
else if (file_exists("/opt/m5stack/scripts/llm-kws_text2token.py"))
awake_key_compile_cmd << "PYTHONPATH=/opt/m5stack/lib/sherpa-onnx/site-packages /usr/bin/python3 /opt/m5stack/scripts/llm-kws_text2token.py ";
awake_key_compile_cmd << "PYTHONPATH=/opt/m5stack/lib/sherpa-onnx/site-packages /usr/bin/python3 "
"/opt/m5stack/scripts/llm-kws_text2token.py ";
else {
SLOGE("text2token.py or llm-kws_text2token.py not found!");
}
@@ -267,9 +269,6 @@ public:
~llm_task()
{
stop();
if (spotter_stream_) {
spotter_stream_.reset();
}
buffer_destroy(pcmdata);
}
};
@@ -228,9 +228,6 @@ public:
~llm_task()
{
stop();
if (vad_) {
vad_.reset();
}
buffer_destroy(pcmdata);
}
};
@@ -340,6 +340,7 @@ public:
~llm_task()
{
stop();
if (yolo_) yolo_->Release();
_ax_deinit();
}
};