Skip to content

Commit

Permalink
Update Audio.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
znsoftm authored Mar 17, 2023
1 parent dee81c3 commit c3c9b6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp_onnx/src/Audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)

size_t nOffset = 0;

#define WAV_HEADER_SIZE 44

speech_len = nBufLen / 2;
speech_align_len = (int)(ceil((float)speech_len / align_size) * align_size);
Expand All @@ -263,6 +262,8 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)
speech_data[i] = (float)speech_buff[i] / scale;
}

AudioFrame* frame = new AudioFrame(speech_len);
frame_queue.push(frame);

return true;

Expand Down

0 comments on commit c3c9b6b

Please sign in to comment.