Skip to content

Commit

Permalink
fix: Android demo detect invalid when the button is pressed again
Browse files Browse the repository at this point in the history
  • Loading branch information
chuhonglin committed Aug 23, 2023
1 parent 630e9da commit 2437b25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/android/app/src/main/cpp/wekws.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void accept_waveform(JNIEnv* env, jobject, jshortArray jWaveform) {
int16_t* waveform = env->GetShortArrayElements(jWaveform, 0);
std::vector<int16_t> v(waveform, waveform + size);
feature_pipeline->AcceptWaveform(v);
env->ReleaseShortArrayElements(jWaveform, waveform,0);
env->ReleaseShortArrayElements(jWaveform, waveform, 0);

LOG(INFO) << "wekws accept waveform in ms: " << int(size / 16);
}
Expand Down Expand Up @@ -81,7 +81,7 @@ void set_input_finished() {
// decode_thread.detach();
// }

void start_spot(){
void start_spot() {
std::vector<std::vector<float>> feats;
feature_pipeline->Read(80, &feats);
std::vector<std::vector<float>> prob;
Expand Down

0 comments on commit 2437b25

Please sign in to comment.