Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
RapidASR
Commits
c3c9b6b0
Unverified
Commit
c3c9b6b0
authored
Mar 17, 2023
by
Daniel
Committed by
GitHub
Mar 17, 2023
Browse files
Update Audio.cpp
parent
dee81c34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
cpp_onnx/src/Audio.cpp
cpp_onnx/src/Audio.cpp
+2
-1
No files found.
cpp_onnx/src/Audio.cpp
View file @
c3c9b6b0
...
@@ -237,7 +237,6 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)
...
@@ -237,7 +237,6 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)
size_t
nOffset
=
0
;
size_t
nOffset
=
0
;
#define WAV_HEADER_SIZE 44
speech_len
=
nBufLen
/
2
;
speech_len
=
nBufLen
/
2
;
speech_align_len
=
(
int
)(
ceil
((
float
)
speech_len
/
align_size
)
*
align_size
);
speech_align_len
=
(
int
)(
ceil
((
float
)
speech_len
/
align_size
)
*
align_size
);
...
@@ -263,6 +262,8 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)
...
@@ -263,6 +262,8 @@ bool Audio::loadpcmwav(const char* buf, int nBufLen)
speech_data
[
i
]
=
(
float
)
speech_buff
[
i
]
/
scale
;
speech_data
[
i
]
=
(
float
)
speech_buff
[
i
]
/
scale
;
}
}
AudioFrame
*
frame
=
new
AudioFrame
(
speech_len
);
frame_queue
.
push
(
frame
);
return
true
;
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment