Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keyword spotting. #1689

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix keyword spotting. #1689

wants to merge 1 commit into from

Conversation

csukuangfj
Copy link
Collaborator

@csukuangfj csukuangfj commented Jan 6, 2025

See also #1417

Fixes #1417

CC @codepubs @brekov


I think there is a bug in keyword spotting.

After the keyword is detected, the result.num_trailing_blanks of subsequent calls with Decode() is always 0.

This PR resets the stream after detecting a keyword to avoid that (Users should call it manually).

Also, it resets the stream automatically after detecting 1.5 seconds of silence.

@csukuangfj
Copy link
Collaborator Author

also, fixes #1235 @carcloudfly @yuyun2000

@yuyun2000
Copy link

This is cool, we recently discovered the blank parameter issue, but haven’t confirmed it yet.

@brekov
Copy link

brekov commented Jan 6, 2025

cool! please supplement the API for JNI / Java / Kotlin. thanks.

brekov added a commit to brekov/sherpa-onnx that referenced this pull request Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

唤醒词不同部分间隔时间超过10s仍能唤醒
3 participants