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

Reduce vad-whisper-c-api example code. #1891

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

whyb
Copy link
Contributor

@whyb whyb commented Feb 18, 2025

Reduce vad-whisper-c-api.c example code.

The current code uses a repeated while loop code (two sections of while) to process the tail data.

while(..) {
}
while(..) {
}

And the optimized early calculation of total_size can circulate less each calculation amount and improve efficiency.

So I reduce sherpa-onnx/c-api-examples/vad-whisper-c-api.c some codes.

This change is exactly the same as these PRs: #1510 and #1742

Copy link
Collaborator

@csukuangfj csukuangfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@csukuangfj csukuangfj merged commit 654d228 into k2-fsa:master Feb 18, 2025
5 checks passed
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.

2 participants