Skip to content

Commit

Permalink
Merge pull request #56 from 916BGAI/dev
Browse files Browse the repository at this point in the history
fix linux platform build fail
  • Loading branch information
Neutree authored Nov 26, 2024
2 parents 4ddae04 + 0289e68 commit dd2ede3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/nn/include/maix_nn_speech.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
namespace maix::nn
{

static bool _is_skip_frames {false};
static std::function<void(std::vector<std::pair<int, float>>, int)> raw_callback;
static std::function<void(char*, int)> digit_callback;
static std::function<void(std::vector<float>, int)> kws_callback;
Expand Down Expand Up @@ -48,6 +47,9 @@ enum class SpeechDecoder {
};

#ifdef PLATFORM_MAIXCAM

static bool _is_skip_frames {false};

/**
* Speech
* @maixpy maix.nn.Speech
Expand Down Expand Up @@ -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<void(std::vector<std::pair<int, float>>, int)> callback)
err::Err raw(std::function<void(std::vector<std::pair<int, float>>, int)> callback)
{
if (this->dev_type() == SpeechDevice::DEVICE_NONE) {
log::error("please init a type of audio device first.");
Expand Down Expand Up @@ -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<void(std::vector<pnyp_t>, int)> callback)
err::Err raw(std::function<void(std::vector<std::pair<int, float>>, int)> callback)
{
return err::ERR_NONE;
}
Expand Down

0 comments on commit dd2ede3

Please sign in to comment.