Skip to content

delete: Remove outdated test documents and test files#888

Merged
WEIFENG2333 merged 1 commit intomasterfrom
fix-whisper-cpp-input
Nov 22, 2025
Merged

delete: Remove outdated test documents and test files#888
WEIFENG2333 merged 1 commit intomasterfrom
fix-whisper-cpp-input

Conversation

@WEIFENG2333
Copy link
Copy Markdown
Owner

@WEIFENG2333 WEIFENG2333 commented Nov 22, 2025

Note

Removes Hear ASR tests and multiple test-related Markdown docs across asr, subtitle, and tts.

  • Tests:
    • Remove tests/test_asr/test_hear_asr.py (Hear ASR unit/integration tests).
  • Docs (tests):
    • Delete Markdown guides/reports: tests/test_asr/TEST_CHUNKED_ASR_REPORT.md, tests/test_asr/TEST_GUIDE.md.
    • Remove subtitle docs: tests/test_subtitle/README.md, tests/test_subtitle/TESTING_SUMMARY.md.
    • Remove TTS docs: tests/test_tts/README.md.

Written by Cursor Bugbot for commit cecc8d7. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings November 22, 2025 10:35
@claude
Copy link
Copy Markdown

claude bot commented Nov 22, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_path parameter to audio_input in BaseASR and 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>
Copy link

Copilot AI Nov 22, 2025

Choose a reason for hiding this comment

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

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>
Suggested change
<translation>Whisper CPP Settings (unstable 🤔)</translation>
<translation>Whisper CPP Settings</translation>

Copilot uses AI. Check for mistakes.
"""Get audio duration in seconds using pydub."""
if not self.file_binary:
return 0.0
return 0.01
Copy link

Copilot AI Nov 22, 2025

Choose a reason for hiding this comment

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

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:

  1. Mentioned in the PR description
  2. Possibly be in a separate commit

If this is unintentional, it should be reverted to 0.0 to maintain the original behavior.

Suggested change
return 0.01
return 0.0

Copilot uses AI. Check for mistakes.
super().__init__(audio_path, use_cache)
self.audio_path = audio_path
super().__init__(audio_input, use_cache)
self.audio_input = audio_input
Copy link

Copilot AI Nov 22, 2025

Choose a reason for hiding this comment

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

[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.

Suggested change
self.audio_input = audio_input

Copilot uses AI. Check for mistakes.
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"
Copy link

Copilot AI Nov 22, 2025

Choose a reason for hiding this comment

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

[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.

Copilot uses AI. Check for mistakes.
<location filename="../../app/components/WhisperCppSettingWidget.py" line="530"/>
<source>Whisper CPP 设置(不稳定 🤔)</source>
<source>Whisper CPP 设置</source>
<translation>Whisper CPP 設置(不穩定 🤔)</translation>
Copy link

Copilot AI Nov 22, 2025

Choose a reason for hiding this comment

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

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>
Suggested change
<translation>Whisper CPP 設置(不穩定 🤔)</translation>
<translation>Whisper CPP 設置</translation>

Copilot uses AI. Check for mistakes.
@WEIFENG2333 WEIFENG2333 force-pushed the fix-whisper-cpp-input branch from 2acc132 to cecc8d7 Compare November 22, 2025 10:44
@claude
Copy link
Copy Markdown

claude bot commented Nov 22, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

@WEIFENG2333 WEIFENG2333 changed the title Fix whisper cpp input delete: Remove outdated test documents and test files Nov 22, 2025
@WEIFENG2333 WEIFENG2333 merged commit afd7cc4 into master Nov 22, 2025
1 of 2 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