Repository Analysis

WEIFENG2333/VideoCaptioner

🎬 卡卡字幕助手 | VideoCaptioner - 基于 LLM 的智能字幕助手 - 视频字幕生成、断句、校正、字幕翻译全流程处理!- A powered tool for easy and efficient video subtitling.

18.1 Moderate AI signal View on GitHub
18.1
Adjusted Score
18.1
Raw Score
100%
Time Factor
2026-05-24
Last Push
14,812
Stars
Python
Language
54,319
Lines of Code
262
Files
665
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 2HIGH 23MEDIUM 84LOW 556

Pattern Findings

665 matches across 16 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers287 hits · 280 pts
SeverityFileLineSnippet
LOWvideocaptioner/ui/task_factory.py245 def create_transcript_and_subtitle_task(
LOWvideocaptioner/ui/components/WhisperCppSettingWidget.py408 def _on_model_download_progress(value, msg):
LOWvideocaptioner/ui/components/WhisperCppSettingWidget.py412 def _on_model_download_finished():
LOWvideocaptioner/ui/components/WhisperCppSettingWidget.py489 def _set_all_download_buttons_enabled(self, enabled: bool):
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py126def check_faster_whisper_exists() -> tuple[bool, list[str]]:
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py451 def _on_program_download_progress(self, value, status_msg):
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py456 def _on_program_download_finished(self, save_path):
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py479 def _on_program_download_error(self, error):
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py533 def _on_model_download_progress(value, msg):
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py537 def _on_model_download_finished():
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py607 def _set_all_download_buttons_enabled(self, enabled: bool):
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py634 def _finish_program_installation(self):
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py878 def check_faster_whisper_model(self):
LOWvideocaptioner/ui/components/WhisperAPISettingWidget.py161 def on_connection_check_finished(self, success, result):
LOWvideocaptioner/ui/components/WhisperAPISettingWidget.py184 def on_connection_check_error(self, message):
LOWvideocaptioner/ui/view/video_synthesis_interface.py285 def on_soft_subtitle_action_triggered(self, checked: bool):
LOWvideocaptioner/ui/view/video_synthesis_interface.py316 def on_need_video_action_triggered(self, checked: bool):
LOWvideocaptioner/ui/view/video_synthesis_interface.py344 def on_video_quality_action_changed(self, quality_text: str):
LOWvideocaptioner/ui/view/video_synthesis_interface.py363 def on_use_style_action_triggered(self, checked: bool):
LOWvideocaptioner/ui/view/video_synthesis_interface.py406 def on_render_mode_changed_external(self, mode_text: str):
LOWvideocaptioner/ui/view/video_synthesis_interface.py410 def _update_synthesis_controls_state(self):
LOWvideocaptioner/ui/view/video_synthesis_interface.py422 def _update_style_controls_state(self):
LOWvideocaptioner/ui/view/video_synthesis_interface.py499 def on_video_synthesis_finished(self, task):
LOWvideocaptioner/ui/view/video_synthesis_interface.py511 def on_video_synthesis_progress(self, progress, message):
LOWvideocaptioner/ui/view/subtitle_interface.py421 def _update_prompt_button_style(self) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py449 def start_subtitle_optimization(self, need_create_task: bool = True) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py502 def on_subtitle_optimization_finished(
LOWvideocaptioner/ui/view/subtitle_interface.py518 def on_subtitle_optimization_error(self, error: str) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py529 def on_subtitle_optimization_progress(self, value: int, status: str) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py861 def retranslate_selected_rows(self, rows: List[int]) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py956 def on_target_language_changed(self, language: str) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py964 def on_subtitle_optimization_changed(self, checked: bool) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py969 def on_subtitle_translation_changed(self, checked: bool) -> None:
LOWvideocaptioner/ui/view/subtitle_interface.py976 def on_subtitle_layout_changed(self, layout: str) -> None:
LOWvideocaptioner/ui/view/subtitle_style_interface.py687 def on_open_style_folder_clicked(self):
LOWvideocaptioner/ui/view/subtitle_style_interface.py691 def on_subtitle_layout_changed(self, layout: str):
LOWvideocaptioner/ui/view/subtitle_style_interface.py696 def on_render_mode_changed_external(self, mode_text: str):
LOWvideocaptioner/ui/view/transcription_interface.py216 def update_audio_track_button_text(
LOWvideocaptioner/ui/view/transcription_interface.py458 def on_transcription_model_changed(self, model_name: str):
LOWvideocaptioner/ui/view/task_creation_interface.py327 def on_video_download_finished(self, video_file_path):
LOWvideocaptioner/ui/view/home_interface.py85 def switch_to_subtitle_optimization(self, file_path, video_path):
LOWvideocaptioner/ui/view/home_interface.py95 def switch_to_video_synthesis(self, video_path, subtitle_path):
LOWvideocaptioner/ui/thread/batch_process_thread.py177 def _on_trans_sub_progress_wrapper(
LOWvideocaptioner/ui/thread/batch_process_thread.py184 def _on_trans_sub_finished_wrapper(
LOWvideocaptioner/ui/thread/batch_process_thread.py212 def _on_trans_sub_subtitle_progress_wrapper(
LOWvideocaptioner/ui/thread/batch_process_thread.py219 def _handle_full_process_task(self, batch_task: BatchTask):
LOWvideocaptioner/ui/thread/batch_process_thread.py273 def on_full_process_subtitle_progress(
LOWvideocaptioner/ui/thread/batch_process_thread.py281 def on_full_process_subtitle_finished(
LOWvideocaptioner/ui/thread/batch_process_thread.py304 def on_full_process_synthesis_progress(
LOWvideocaptioner/ui/thread/transcript_thread.py58 def _check_downloaded_subtitle(self) -> bool:
LOWvideocaptioner/ui/thread/subtitle_thread.py38def create_translator_from_config(
LOWvideocaptioner/ui/thread/modelscope_download_thread.py33def create_progress_callback_class(
LOWvideocaptioner/ui/thread/version_checker_thread.py132 def check_new_version_announcement(self) -> None:
LOWvideocaptioner/core/entities.py476def _get_all_languages_except_auto() -> list[TranscribeLanguageEnum]:
LOWvideocaptioner/core/entities.py511def get_asr_language_capability(model: TranscribeModelEnum) -> ASRLanguageCapability:
LOWvideocaptioner/core/split/split.py591 def _merge_processed_segments(
LOWvideocaptioner/core/split/split.py661 def _merge_segments_based_on_sentences(
LOWvideocaptioner/core/llm/request_logger.py83def create_logging_http_client() -> httpx.Client:
LOWvideocaptioner/core/optimize/optimize.py273 def _validate_optimization_result(
LOWvideocaptioner/core/translate/base.py150 def _set_segments_translated_text(
227 more matches not shown…
Decorative Section Separators72 hits · 267 pts
SeverityFileLineSnippet
MEDIUMvideocaptioner/cli/main.py526# ── Command runners ──────────────────────────────────────────────────────────
MEDIUMtests/test_tts/test_tts_integration.py195# ============================================================================
MEDIUMtests/test_tts/test_tts_integration.py197# ============================================================================
MEDIUMtests/test_tts/test_tts_core.py504# ============================================================================
MEDIUMtests/test_tts/test_tts_core.py506# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py61# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py63# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py193# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py195# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py353# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py355# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py468# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py470# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py691# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py693# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py746# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py748# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py536# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py538# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py615# ============================================================================
MEDIUMtests/test_asr/test_chunk_merger.py617# ============================================================================
MEDIUMtests/test_asr/conftest.py11# ============================================================================
MEDIUMtests/test_asr/conftest.py13# ============================================================================
MEDIUMtests/test_asr/test_chunking.py163# ============================================================================
MEDIUMtests/test_asr/test_chunking.py165# ============================================================================
MEDIUMtests/test_asr/test_chunking.py277# ============================================================================
MEDIUMtests/test_asr/test_chunking.py279# ============================================================================
MEDIUMtests/test_asr/test_chunking.py282# ============================================================================
MEDIUMtests/test_asr/test_chunking.py293# ============================================================================
MEDIUMtests/test_asr/test_chunking.py295# ============================================================================
MEDIUMtests/test_asr/test_chunking.py303# ============================================================================
MEDIUMtests/test_asr/test_chunking.py305# ============================================================================
MEDIUMtests/test_asr/test_chunking.py313# ============================================================================
MEDIUMtests/test_asr/test_chunking.py315# ============================================================================
MEDIUMtests/test_asr/test_chunking.py323# ============================================================================
MEDIUMtests/test_asr/test_chunking.py325# ============================================================================
MEDIUMtests/test_asr/test_chunking.py333# ============================================================================
MEDIUMtests/test_asr/test_chunking.py335# ============================================================================
MEDIUMtests/test_asr/test_chunking.py22# ============================================================================
MEDIUMtests/test_asr/test_chunking.py24# ============================================================================
MEDIUMtests/test_asr/test_chunking.py117# ============================================================================
MEDIUMtests/test_asr/test_chunking.py119# ============================================================================
MEDIUMtests/test_asr/test_chunking.py413# ============================================================================
MEDIUMtests/test_asr/test_chunking.py421# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py340# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py342# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py406# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py408# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py463# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py465# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py28# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py30# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py119# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py121# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py210# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py212# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py284# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py286# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py366# ============================================================================
MEDIUMtests/test_asr/test_chunked_asr.py368# ============================================================================
12 more matches not shown…
Excessive Try-Catch Wrapping116 hits · 126 pts
SeverityFileLineSnippet
LOWvideocaptioner/config.py11except Exception:
LOWvideocaptioner/ui/components/WhisperCppSettingWidget.py459 except Exception as e:
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py176 except Exception as e:
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py475 except Exception as e:
MEDIUM…ocaptioner/ui/components/FasterWhisperSettingWidget.py164def run(self):
LOWvideocaptioner/ui/components/WhisperAPISettingWidget.py217 except Exception as e:
LOWvideocaptioner/ui/components/MyVideoWidget.py255 except Exception:
LOWvideocaptioner/ui/components/MyVideoWidget.py370 except Exception:
LOWvideocaptioner/ui/view/subtitle_interface.py602 except Exception as e:
LOWvideocaptioner/ui/view/log_window.py60 except Exception as e:
LOWvideocaptioner/ui/view/log_window.py110 except Exception as e:
LOWvideocaptioner/ui/view/log_window.py152 except Exception as e:
LOWvideocaptioner/ui/view/setting_interface.py1014 except Exception as e:
LOWvideocaptioner/ui/view/setting_interface.py1036 except Exception as e:
LOWvideocaptioner/ui/view/llm_logs_interface.py325 except Exception as e:
LOWvideocaptioner/ui/view/llm_logs_interface.py466 except Exception as e:
LOWvideocaptioner/ui/thread/subtitle_pipeline_thread.py128 except Exception as e:
MEDIUMvideocaptioner/ui/thread/subtitle_pipeline_thread.py36def run(self):
LOWvideocaptioner/ui/thread/video_download_thread.py35 except Exception as e:
LOWvideocaptioner/ui/thread/video_download_thread.py163 except Exception:
MEDIUMvideocaptioner/ui/thread/video_download_thread.py29def run(self):
LOWvideocaptioner/ui/thread/batch_process_thread.py89 except Exception as e:
LOWvideocaptioner/ui/thread/transcript_thread.py37 except Exception as e:
MEDIUMvideocaptioner/ui/thread/transcript_thread.py24def run(self):
LOWvideocaptioner/ui/thread/subtitle_thread.py235 except Exception as e:
LOWvideocaptioner/ui/thread/subtitle_thread.py276 except Exception as e:
LOWvideocaptioner/ui/thread/subtitle_thread.py288 except Exception as e:
LOWvideocaptioner/ui/thread/subtitle_thread.py351 except Exception as e:
LOWvideocaptioner/ui/thread/video_synthesis_thread.py103 except Exception as e:
MEDIUMvideocaptioner/ui/thread/video_synthesis_thread.py25def run(self):
LOWvideocaptioner/ui/thread/modelscope_download_thread.py79 except Exception as e:
MEDIUMvideocaptioner/ui/thread/modelscope_download_thread.py64def run(self):
LOWvideocaptioner/ui/thread/version_checker_thread.py90 except Exception as e:
LOWvideocaptioner/ui/thread/version_checker_thread.py158 except Exception:
LOWvideocaptioner/ui/thread/video_info_thread.py36 except Exception as e:
MEDIUMvideocaptioner/ui/thread/video_info_thread.py21def run(self):
LOWvideocaptioner/ui/thread/file_download_thread.py121 except Exception:
LOWvideocaptioner/ui/thread/file_download_thread.py219 except Exception as e:
MEDIUMvideocaptioner/ui/thread/file_download_thread.py197def run(self):
LOWvideocaptioner/core/split/split_by_llm.py36 except Exception as e:
LOWvideocaptioner/core/split/split.py165 except Exception as e:
LOWvideocaptioner/core/split/split.py264 except Exception as e:
LOWvideocaptioner/core/split/split.py275 except Exception as e:
LOWvideocaptioner/core/split/split.py781 except Exception as e:
LOWvideocaptioner/core/llm/check_whisper.py74 except Exception as e:
LOWvideocaptioner/core/llm/request_logger.py44 except Exception:
LOWvideocaptioner/core/llm/check_llm.py50 except Exception as e:
LOWvideocaptioner/core/llm/check_llm.py108 except Exception:
LOWvideocaptioner/core/optimize/optimize.py101 except Exception as e:
LOWvideocaptioner/core/optimize/optimize.py148 except Exception as e:
LOWvideocaptioner/core/optimize/optimize.py183 except Exception as e:
LOWvideocaptioner/core/optimize/optimize.py378 except Exception as e:
LOWvideocaptioner/core/optimize/optimize.py415 except Exception:
LOWvideocaptioner/core/translate/google_translator.py67 except Exception as e:
LOWvideocaptioner/core/translate/bing_translator.py48 except Exception as e:
LOWvideocaptioner/core/translate/bing_translator.py87 except Exception as e:
LOWvideocaptioner/core/translate/bing_translator.py96 except Exception as e:
LOWvideocaptioner/core/translate/factory.py72 except Exception as e:
LOWvideocaptioner/core/translate/deeplx_translator.py53 except Exception as e:
LOWvideocaptioner/core/translate/llm_translator.py95 except Exception as e:
56 more matches not shown…
Unused Imports75 hits · 74 pts
SeverityFileLineSnippet
LOWvideocaptioner/core/entities.py8
LOWvideocaptioner/core/llm/__init__.py3
LOWvideocaptioner/core/llm/__init__.py3
LOWvideocaptioner/core/llm/__init__.py4
LOWvideocaptioner/core/llm/__init__.py5
LOWvideocaptioner/core/llm/__init__.py5
LOWvideocaptioner/core/translate/__init__.py7
LOWvideocaptioner/core/translate/__init__.py8
LOWvideocaptioner/core/translate/__init__.py9
LOWvideocaptioner/core/translate/__init__.py10
LOWvideocaptioner/core/translate/__init__.py11
LOWvideocaptioner/core/translate/__init__.py12
LOWvideocaptioner/core/translate/__init__.py13
LOWvideocaptioner/core/translate/__init__.py14
LOWvideocaptioner/core/translate/__init__.py14
LOWvideocaptioner/core/utils/video_utils.py22
LOWvideocaptioner/core/speech/__init__.py3
LOWvideocaptioner/core/speech/__init__.py3
LOWvideocaptioner/core/speech/__init__.py3
LOWvideocaptioner/core/speech/__init__.py4
LOWvideocaptioner/core/speech/__init__.py4
LOWvideocaptioner/core/speech/__init__.py4
LOWvideocaptioner/core/speech/__init__.py4
LOWvideocaptioner/core/speech/__init__.py4
LOWvideocaptioner/core/asr/__init__.py1
LOWvideocaptioner/core/asr/__init__.py2
LOWvideocaptioner/core/asr/__init__.py3
LOWvideocaptioner/core/asr/__init__.py4
LOWvideocaptioner/core/asr/__init__.py5
LOWvideocaptioner/core/asr/__init__.py6
LOWvideocaptioner/core/asr/__init__.py7
LOWvideocaptioner/core/asr/__init__.py8
LOWvideocaptioner/core/subtitle/rounded_renderer.py21
LOWvideocaptioner/core/subtitle/ass_renderer.py19
LOWvideocaptioner/core/subtitle/__init__.py5
LOWvideocaptioner/core/subtitle/__init__.py5
LOWvideocaptioner/core/subtitle/__init__.py6
LOWvideocaptioner/core/subtitle/__init__.py6
LOWvideocaptioner/core/subtitle/__init__.py6
LOWvideocaptioner/core/subtitle/__init__.py6
LOWvideocaptioner/core/subtitle/__init__.py6
LOWvideocaptioner/core/subtitle/__init__.py13
LOWvideocaptioner/core/subtitle/__init__.py13
LOWvideocaptioner/core/subtitle/__init__.py13
LOWvideocaptioner/core/subtitle/__init__.py13
LOWvideocaptioner/core/subtitle/__init__.py13
LOWvideocaptioner/core/subtitle/__init__.py20
LOWvideocaptioner/core/subtitle/__init__.py20
LOWvideocaptioner/core/subtitle/__init__.py21
LOWvideocaptioner/core/subtitle/__init__.py21
LOWvideocaptioner/core/subtitle/__init__.py21
LOWvideocaptioner/core/subtitle/__init__.py21
LOWvideocaptioner/core/subtitle/__init__.py21
LOWvideocaptioner/core/subtitle/__init__.py29
LOWvideocaptioner/core/subtitle/__init__.py30
LOWvideocaptioner/core/subtitle/__init__.py30
LOWvideocaptioner/core/subtitle/__init__.py30
LOWvideocaptioner/core/tts/__init__.py6
LOWvideocaptioner/core/tts/__init__.py7
LOWvideocaptioner/core/tts/__init__.py8
15 more matches not shown…
Deep Nesting54 hits · 54 pts
SeverityFileLineSnippet
LOWvideocaptioner/ui/task_factory.py110
LOWvideocaptioner/ui/components/WhisperCppSettingWidget.py383
LOWvideocaptioner/ui/components/WhisperCppSettingWidget.py412
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py503
LOW…ocaptioner/ui/components/FasterWhisperSettingWidget.py537
LOWvideocaptioner/ui/components/MyVideoWidget.py185
LOWvideocaptioner/ui/view/subtitle_interface.py78
LOWvideocaptioner/ui/view/subtitle_interface.py915
LOWvideocaptioner/ui/view/subtitle_style_interface.py909
LOWvideocaptioner/ui/view/llm_logs_interface.py308
LOWvideocaptioner/ui/view/batch_process_interface.py176
LOWvideocaptioner/ui/thread/video_download_thread.py115
LOWvideocaptioner/ui/thread/batch_process_thread.py73
LOWvideocaptioner/ui/thread/subtitle_thread.py100
LOWvideocaptioner/ui/thread/file_download_thread.py136
LOWvideocaptioner/core/split/alignment.py74
LOWvideocaptioner/core/split/split_by_llm.py110
LOWvideocaptioner/core/split/split.py57
LOWvideocaptioner/core/split/split.py343
LOWvideocaptioner/core/split/split.py661
LOWvideocaptioner/core/llm/client.py52
LOWvideocaptioner/core/llm/check_llm.py54
LOWvideocaptioner/core/translate/bing_translator.py52
LOWvideocaptioner/core/translate/factory.py20
LOWvideocaptioner/core/utils/video_utils.py173
LOWvideocaptioner/core/utils/platform_utils.py15
LOWvideocaptioner/core/utils/platform_utils.py56
LOWvideocaptioner/core/utils/subprocess_helper.py90
LOWvideocaptioner/core/utils/subprocess_helper.py142
LOWvideocaptioner/core/asr/whisper_cpp.py114
LOWvideocaptioner/core/asr/asr_data.py220
LOWvideocaptioner/core/asr/asr_data.py248
LOWvideocaptioner/core/asr/asr_data.py275
LOWvideocaptioner/core/asr/asr_data.py320
LOWvideocaptioner/core/asr/asr_data.py515
LOWvideocaptioner/core/asr/asr_data.py782
LOWvideocaptioner/core/asr/faster_whisper.py227
LOWvideocaptioner/core/asr/transcribe.py45
LOWvideocaptioner/core/subtitle/font_utils.py18
LOWvideocaptioner/core/subtitle/font_utils.py74
LOWvideocaptioner/core/subtitle/text_utils.py98
LOWvideocaptioner/core/subtitle/text_utils.py172
LOWvideocaptioner/core/subtitle/rounded_renderer.py268
LOWvideocaptioner/core/subtitle/ass_renderer.py244
LOWvideocaptioner/core/subtitle/ass_utils.py52
LOWvideocaptioner/core/tts/siliconflow.py30
LOWvideocaptioner/cli/commands/config_cmd.py24
LOWvideocaptioner/cli/commands/subtitle.py49
LOWvideocaptioner/cli/commands/style_cmd.py28
LOWvideocaptioner/cli/commands/synthesize.py39
LOWvideocaptioner/cli/commands/synthesize.py155
LOWvideocaptioner/cli/commands/transcribe.py13
LOWtests/test_split/test_split_realistic.py13
LOWscripts/translate_llm.py188
Docstring Block Structure9 hits · 45 pts
SeverityFileLineSnippet
HIGHvideocaptioner/core/split/split.py119分割字幕(主入口) 处理流程: 1. Reading并预处理字幕 2. 按字数Segments 3. 并发调用LLM处理 4. 合并结果并优化
HIGHvideocaptioner/core/split/split.py667基于LLM返回的句子列表合并ASRSegments 使用滑动窗口匹配算法: 1. 对每个LLM句子,寻找最佳匹配的ASRSegments序列 2. 使用相似度算法进行匹配 3
HIGHvideocaptioner/core/optimize/optimize.py188使用agent loop优化字幕 LLM → 验证 → 反馈 → 重试 (最多MAX_STEPS次) Args: subtitle_chunk: 字幕批次字典 R
HIGHvideocaptioner/core/utils/cache.py72Decorator to cache function results with global switch support. This is a thin wrapper around diskcache.Cache.memoi
HIGHvideocaptioner/core/asr/asr_data.py516Load ASRData from subtitle file. Args: file_path: Subtitle file path (supports .srt, .vtt, .ass, .j
HIGHvideocaptioner/core/asr/chunk_merger.py43合并多个音频片段的 ASR 结果 Args: chunks: ASRData 对象列表(每个 chunk 的 segments 应从 0 开始) chunk_offsets:
HIGHvideocaptioner/core/tts/siliconflow.py36上传音频并获取声音克隆 URI Args: audio_path: 音频文件路径 text: 对应文本内容 model: 模型名称
HIGHvideocaptioner/core/prompts/__init__.py25从文件加载提示词(带LRU缓存) Args: prompt_path: 提示词相对路径,如 "split/semantic" Returns: 提示词原始文本 Raises:
HIGHvideocaptioner/core/prompts/__init__.py48获取提示词并进行变量替换 Args: prompt_path: 提示词路径,如 "split/semantic", "optimize/subtitle" **kwargs: 模板变量,用于替换提示
Cross-File Repetition9 hits · 45 pts
SeverityFileLineSnippet
HIGHtests/test_asr/test_bcut_asr.py0test transcription with different configurations and languages. args: need_word_ts: whether to use word-level timestamps
HIGHtests/test_asr/test_jianying_asr.py0test transcription with different configurations and languages. args: need_word_ts: whether to use word-level timestamps
HIGHtests/test_asr/test_whisper_api_asr.py0test transcription with different configurations and languages. args: need_word_ts: whether to use word-level timestamps
HIGHtests/test_translate/test_deeplx_translator.py0test translating simple asr data with quality validation.
HIGHtests/test_translate/test_bing_translator.py0test translating simple asr data with quality validation.
HIGHtests/test_translate/test_google_translator.py0test translating simple asr data with quality validation.
HIGHtests/test_translate/test_deeplx_translator.py0test translating a single chunk of data with quality validation.
HIGHtests/test_translate/test_bing_translator.py0test translating a single chunk of data with quality validation.
HIGHtests/test_translate/test_google_translator.py0test translating a single chunk of data with quality validation.
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippet
CRITICALvideocaptioner/core/tts/openai_tts.py47 with self.client.audio.speech.with_streaming_response.create(
CRITICALtests/test_tts/test_tts_core.py416 mock_client.audio.speech.with_streaming_response.create.assert_called_once_with(
Verbosity Indicators10 hits · 16 pts
SeverityFileLineSnippet
LOWvideocaptioner/core/subtitle/text_utils.py103 # Step 1: Calculate minimum required lines using greedy algorithm
LOWvideocaptioner/core/subtitle/text_utils.py124 # Step 2: Calculate total width and target width per line
LOWvideocaptioner/core/subtitle/text_utils.py129 # Step 3: Redistribute text to achieve balanced lines
LOWvideocaptioner/core/subtitle/text_utils.py181 # Step 1: Calculate minimum required lines
LOWvideocaptioner/core/subtitle/text_utils.py202 # Step 2: Calculate target width
LOWvideocaptioner/core/subtitle/text_utils.py207 # Step 3: Redistribute words to achieve balanced lines
LOWvideocaptioner/cli/commands/process.py74 # Step 1: Transcribe
LOWvideocaptioner/cli/commands/process.py98 # Step 2: Subtitle (optimize + translate)
LOWvideocaptioner/cli/commands/process.py132 # Step 3: Dub
LOWvideocaptioner/cli/commands/process.py196 # Step 4: Synthesize
Magic Placeholder Names4 hits · 15 pts
SeverityFileLineSnippet
HIGHtests/README.md54OPENAI_API_KEY=sk-your-api-key
HIGHtests/test_tts/test_tts_integration.py5 OPENAI_TTS_API_KEY=your-api-key-here
HIGHtests/test_tts/test_tts_integration.py10 OPENAI_API_KEY=your-api-key-here
HIGHdocs/dev/translate-module.md109export OPENAI_API_KEY="your-api-key"
Over-Commented Block14 hits · 13 pts
SeverityFileLineSnippet
LOWvideocaptioner/ui/thread/version_checker_thread.py41 data = response.json()
LOWvideocaptioner/core/asr/asr_data.py421 WebVTT format subtitle content
LOWtests/test_asr/test_chunking.py281# 现在使用 ChunkedASR 包装器模式,相关测试已在 test_chunked_asr.py 中实现
LOWtests/test_asr/test_chunking.py401
LOWtests/test_asr/test_bcut_asr.py61 # print(f" Total segments: {len(result.segments)}")
LOWtests/test_asr/test_bcut_asr.py81 # print("BcutASR Word-Level Transcription Results:")
LOWtests/test_asr/test_jianying_asr.py21 # @pytest.fixture
LOWtests/test_asr/test_jianying_asr.py41 # test_audio_path: Path to test audio file
LOWtests/test_asr/test_jianying_asr.py61 # print("\n" + "=" * 60)
LOWtests/test_asr/test_jianying_asr.py81
LOW.github/workflows/claude-code-review.yml1name: Claude Code Review
LOW.github/workflows/claude-code-review.yml61 # - For TypeScript files: Type safety and proper interface usage
LOW.github/workflows/claude.yml41 actions: read
LOW.github/workflows/claude.yml61 # Optional: Custom environment variables for Claude
Redundant / Tautological Comments8 hits · 13 pts
SeverityFileLineSnippet
LOWvideocaptioner/core/subtitle/text_utils.py137 # Check if we should break the line
LOWvideocaptioner/core/subtitle/text_utils.py150 # Check if next char would significantly exceed target
LOWvideocaptioner/core/subtitle/text_utils.py227 # Check if next word would significantly exceed target
LOWvideocaptioner/cli/commands/transcribe.py151 # Check if the temp file is empty (no audio track)
LOWtests/test_subtitle/test_subtitle_thread.py33 # Check if model specified in environment
LOWscripts/trans-extract.sh17# Check if pylupdate5 is available
LOWscripts/run.sh26# Check if running from within the project directory
LOWscripts/run.sh28 # Check if in project directory
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/claude-code-review.yml63 # - For React components: Performance, accessibility, and best practices
MEDIUM.github/workflows/claude-code-review.yml70 # 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippet
HIGHvideocaptioner/ui/components/MyVideoWidget.py277 path = media.toLocalFile() or media.toString()
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMtests/test_thread/conftest.py37 # Create a simple video with a solid color and the audio
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWvideocaptioner/core/asr/bcut.py195 # Example usage