Fix leading silence removal feature#17699
Conversation
|
@gexgd0419 Yess! This fixes the issue. |
|
hi. |
|
Fine. Cannot reproduce beeps and speech chopping on the snapshot build. |
|
Thanks for the fix! It takes care of all issues mentioned. @gexgd0419 Awesome job! |
See test results for failed build of commit 785946df68 |
LeonarddeR
left a comment
There was a problem hiding this comment.
Works like a charm now, thanks for fixing!
Link to issue number:
None. Fixes problems introduced by PR #17648.
Summary of the issue:
The leading silence trimming feature should only trim the silence part of the audio. However, a longer part of the speech audio ended up being chopped off, which makes distinguishing the consonants at the beginning more difficult.
In addition, trimming is incorrectly applied to non-speech audio, and applied even when the feature is turned off in Settings.
Description of user facing changes
The problem mentioned above should be fixed.
Description of development approach
Added missing check for
_enableTrimmingLeadingSilencein_idleCheck.Before sending the trimmed audio to the device, one silent sample will be inserted at the beginning. For some reason, if the first sample is not zero, the audio may be chopped off at the beginning. Although the exact cause is still unknown, prepending one silent sample seems to fix this issue. See this discussion.
Testing strategy:
Tested manually on my system. Now the output waveform seems normal.
Known issues with pull request:
None.
Code Review Checklist:
@coderabbitai summary