mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
Fix error in vad example
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(silero_vad)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
@@ -93,7 +93,7 @@ void Vad::setAudioCofig(int sr, int frame_ms, float threshold,
|
||||
Vad::speech_pad_ms_ = speech_pad_ms;
|
||||
}
|
||||
|
||||
bool Vad::Preprocess(std::vector<float> audioWindowData) {
|
||||
bool Vad::Preprocess(std::vector<float>& audioWindowData) {
|
||||
inputTensors_.resize(4);
|
||||
inputTensors_[0].name = "input";
|
||||
inputTensors_[0].SetExternalData(input_node_dims_, fastdeploy::FDDataType::FP32,
|
||||
|
||||
@@ -50,7 +50,7 @@ class Vad : public fastdeploy::FastDeployModel {
|
||||
private:
|
||||
bool Initialize();
|
||||
|
||||
bool Preprocess(std::vector<float> audioWindowData);
|
||||
bool Preprocess(std::vector<float>& audioWindowData);
|
||||
|
||||
bool Postprocess();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user