From 0289e6889114c9cb733474651fe4efbaf625f3aa Mon Sep 17 00:00:00 2001 From: 916BGAI <916772719@qq.com> Date: Tue, 26 Nov 2024 10:36:51 +0800 Subject: [PATCH] fix linux platform build fail --- components/nn/include/maix_nn_speech.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/nn/include/maix_nn_speech.hpp b/components/nn/include/maix_nn_speech.hpp index 68ecfaf5..3cf63b5d 100644 --- a/components/nn/include/maix_nn_speech.hpp +++ b/components/nn/include/maix_nn_speech.hpp @@ -18,7 +18,6 @@ namespace maix::nn { -static bool _is_skip_frames {false}; static std::function>, int)> raw_callback; static std::function digit_callback; static std::function, int)> kws_callback; @@ -48,6 +47,9 @@ enum class SpeechDecoder { }; #ifdef PLATFORM_MAIXCAM + + static bool _is_skip_frames {false}; + /** * Speech * @maixpy maix.nn.Speech @@ -293,7 +295,7 @@ enum class SpeechDecoder { * @return err::Err type, if init success, return err::ERR_NONE * @maixpy maix.nn.Speech.raw */ - err::Err raw(std::function>, int)> callback) + err::Err raw(std::function>, int)> callback) { if (this->dev_type() == SpeechDevice::DEVICE_NONE) { log::error("please init a type of audio device first."); @@ -778,7 +780,7 @@ enum class SpeechDecoder { * @return err::Err type, if init success, return err::ERR_NONE * @maixpy maix.nn.Speech.raw */ - err::Err raw(std::function, int)> callback) + err::Err raw(std::function>, int)> callback) { return err::ERR_NONE; }