-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs: Fix syntax error in real-time ASR example (Issue #2720) #2730
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
base: main
Are you sure you want to change the base?
docs: Fix syntax error in real-time ASR example (Issue #2720) #2730
Conversation
Added documentation to fix syntax error in real-time speech recognition example.
Summary of ChangesHello @SnakeEye-sudo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new documentation file that meticulously details a critical syntax error fix for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request only adds a markdown file to document a syntax error fix, but critically, it does not apply the fix to the actual code. To resolve issue #2720, the fix must be applied directly to the affected source code files. I have left comments on the new documentation file to highlight this and another minor inaccuracy. Please update this PR to include the necessary code changes, as it cannot be merged in its current state.
| - Real-time speech recognition example files that contain the `total_chunk_num` calculation | ||
|
|
||
| ### Related Issue | ||
| - Closes #2720 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request cannot close issue #2720 as it only adds documentation about the fix and does not actually fix the syntax error in the code. The bug is still present in files like examples/industrial_data_pretraining/paraformer_streaming/demo.py. This is a blocking issue for this PR. Please update this PR to include the necessary code changes.
|
|
||
| ```python | ||
| # INCORRECT (with syntax error) | ||
| total_chunk_num = int(len(speech)-1)/chunk_stride+1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The incorrect code snippet here is slightly different from what's in some of the affected files. For example, in examples/industrial_data_pretraining/paraformer_streaming/demo.py, the line is total_chunk_num = int(len((speech) - 1) / chunk_stride + 1). This has an extra pair of parentheses around speech, resulting in len(speech - 1), which would likely raise a TypeError. It would be good to ensure the documentation accurately reflects the code being fixed, and that all variants of the error are corrected in the code.
…#2720) Added a section detailing files needing updates for the total_chunk_num calculation syntax error, including examples and testing instructions.
Fix calculation of total_chunk_num for speech processing.
Added documentation to fix syntax error in real-time speech recognition example.