delete: Remove outdated test documents and test files#888
Conversation
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on November 24
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
There was a problem hiding this comment.
Pull request overview
This pull request refactors the ASR (Automatic Speech Recognition) module by renaming the audio_path parameter to audio_input across all ASR implementations. This change better reflects that the parameter can accept either a file path (str) or raw audio bytes, improving API clarity. Additionally, the PR removes outdated test documentation files and updates UI translations to remove the "unstable" warning from Whisper CPP settings.
Key Changes
- Renamed
audio_pathparameter toaudio_inputinBaseASRand all ASR subclasses (WhisperAPI, WhisperCppASR, FasterWhisperASR, BcutASR, JianYingASR) - Updated all test files to use the new parameter name
- Removed obsolete test documentation files (README.md and testing guides)
- Updated UI translations for Whisper CPP settings to remove "unstable" notation
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| app/core/asr/base.py | Renamed parameter from audio_path to audio_input, added Union type hint, updated docstrings, and modified default duration return value |
| app/core/asr/whisper_api.py | Updated parameter name and type hint to audio_input: Union[str, bytes] |
| app/core/asr/whisper_cpp.py | Updated parameter name, added Union import, updated audio duration handling, and renamed temp file for better debugging |
| app/core/asr/faster_whisper.py | Updated parameter name and type hint, modified file copy logic |
| app/core/asr/bcut.py | Updated parameter name in constructor |
| app/core/asr/jianying.py | Updated parameter name in constructor |
| tests/test_asr/test_whisper_api_asr.py | Updated test calls to use audio_input parameter |
| tests/test_asr/test_jianying_asr.py | Updated test calls to use audio_input parameter |
| tests/test_asr/test_bcut_asr.py | Updated test calls to use audio_input parameter |
| tests/test_asr/test_chunking.py | Updated MockASR and test calls to use audio_input parameter |
| tests/test_asr/test_chunked_asr.py | Updated MockASR class and test variable names from audio_path to audio_input |
| resource/translations/VideoCaptioner_zh_HK.ts | Updated source text for Whisper CPP settings but translation still references old text |
| resource/translations/VideoCaptioner_zh_CN.ts | Updated source text for Whisper CPP settings |
| resource/translations/VideoCaptioner_en_US.ts | Updated source text for Whisper CPP settings but translation still references old text |
| app/components/WhisperCppSettingWidget.py | Removed "unstable" notation from Whisper CPP settings title |
| tests/test_tts/README.md | Removed entire file (test documentation cleanup) |
| tests/test_subtitle/TESTING_SUMMARY.md | Removed entire file (test documentation cleanup) |
| tests/test_subtitle/README.md | Removed entire file (test documentation cleanup) |
| tests/test_asr/TEST_GUIDE.md | Removed entire file (test documentation cleanup) |
| tests/test_asr/TEST_CHUNKED_ASR_REPORT.md | Removed entire file (test documentation cleanup) |
| tests/test_asr/init.py | No changes to display (file included in diff) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <location filename="../../app/components/WhisperCppSettingWidget.py" line="530" /> | ||
| <source>Whisper CPP 设置(不稳定 🤔)</source> | ||
| <source>Whisper CPP 设置</source> | ||
| <translation>Whisper CPP Settings (unstable 🤔)</translation> |
There was a problem hiding this comment.
The translation is inconsistent with the source text. The source text has been updated to remove "(不稳定 🤔)" but the translation still includes "(unstable 🤔)". The translation should be updated to match:
<translation>Whisper CPP Settings</translation>| <translation>Whisper CPP Settings (unstable 🤔)</translation> | |
| <translation>Whisper CPP Settings</translation> |
| """Get audio duration in seconds using pydub.""" | ||
| if not self.file_binary: | ||
| return 0.0 | ||
| return 0.01 |
There was a problem hiding this comment.
The change from 0.0 to 0.01 seems unrelated to the PR's purpose (fixing whisper cpp input). This changes the behavior when file_binary is None, which could have unexpected side effects.
If this change is intentional (e.g., to avoid division by zero elsewhere), it should be:
- Mentioned in the PR description
- Possibly be in a separate commit
If this is unintentional, it should be reverted to 0.0 to maintain the original behavior.
| return 0.01 | |
| return 0.0 |
| super().__init__(audio_path, use_cache) | ||
| self.audio_path = audio_path | ||
| super().__init__(audio_input, use_cache) | ||
| self.audio_input = audio_input |
There was a problem hiding this comment.
[nitpick] This line is redundant since the parent class BaseASR.__init__ already sets self.audio_input = audio_input on line 50 of base.py. This assignment can be removed to reduce duplication.
| self.audio_input = audio_input |
| with tempfile.TemporaryDirectory() as temp_path: | ||
| temp_dir = Path(temp_path) | ||
| wav_path = temp_dir / "audio.wav" | ||
| wav_path = temp_dir / "whisper_cpp_audio.wav" |
There was a problem hiding this comment.
[nitpick] The change from "audio.wav" to "whisper_cpp_audio.wav" is a good improvement for debugging (makes it easier to identify which ASR implementation created the file), but seems unrelated to the PR's main purpose of "fixing whisper cpp input". Consider mentioning this in the PR description or moving it to a separate commit for better change tracking.
| <location filename="../../app/components/WhisperCppSettingWidget.py" line="530"/> | ||
| <source>Whisper CPP 设置(不稳定 🤔)</source> | ||
| <source>Whisper CPP 设置</source> | ||
| <translation>Whisper CPP 設置(不穩定 🤔)</translation> |
There was a problem hiding this comment.
The translation is inconsistent with the source text. The source text has been updated to remove "(不稳定 🤔)" but the translation still includes it. The translation should be updated to match:
<translation>Whisper CPP 設置</translation>| <translation>Whisper CPP 設置(不穩定 🤔)</translation> | |
| <translation>Whisper CPP 設置</translation> |
2acc132 to
cecc8d7
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Note
Removes Hear ASR tests and multiple test-related Markdown docs across asr, subtitle, and tts.
tests/test_asr/test_hear_asr.py(Hear ASR unit/integration tests).tests/test_asr/TEST_CHUNKED_ASR_REPORT.md,tests/test_asr/TEST_GUIDE.md.tests/test_subtitle/README.md,tests/test_subtitle/TESTING_SUMMARY.md.tests/test_tts/README.md.Written by Cursor Bugbot for commit cecc8d7. This will update automatically on new commits. Configure here.