开源 AI 视频本地化工具:自动完成 YouTube/Bilibili 视频下载、字幕识别与翻译、语音克隆配音、音轨混合和字幕压制。
This report presents the forensic synthetic code analysis of liuzhao1225/YouDub-webui, a Python project with 5,081 GitHub stars. SynthScan v2.0 examined 27,263 lines of code across 94 source files, recording 339 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 12.3 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 339 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend/app/auth.py | 107 | def validate_auth_configuration() -> AuthSettings: | CODE |
| LOW | backend/app/config.py | 15 | def _load_runtime_environment(repo_root: Path) -> None: | CODE |
| LOW | backend/app/database.py | 155 | def delete_expired_auth_sessions(expires_before: str) -> int: | CODE |
| LOW | backend/app/database.py | 164 | def reserve_auth_login_attempt( | CODE |
| LOW | backend/app/database.py | 211 | def delete_auth_login_attempt(client_hash: str) -> bool: | CODE |
| LOW | backend/app/database.py | 220 | def backfill_titles_from_metadata() -> None: | CODE |
| LOW | backend/app/pipeline.py | 183 | def _write_uploaded_asr_artifact(self, task: dict) -> Path: | CODE |
| LOW | backend/app/main.py | 109 | def normalize_translate_concurrency(value: str) -> str: | CODE |
| LOW | backend/app/main.py | 145 | async def redact_login_validation_error( | CODE |
| LOW | backend/app/main.py | 203 | def _clear_replaced_login_cookie( | CODE |
| LOW | backend/app/devices.py | 104 | def _resolve_configured_device(value: str, setting_name: str) -> str: | CODE |
| LOW | backend/app/devices.py | 145 | def validate_device_available(selected_device: str, setting_name: str = "DEVICE") -> None: | CODE |
| LOW | backend/app/runtime_security.py | 93 | def _validate_directory_metadata(path: Path, metadata: os.stat_result) -> None: | CODE |
| LOW | backend/app/runtime_security.py | 107 | def _secure_open_fd_without_mode_change(path: Path, *, directory: bool) -> int: | CODE |
| LOW | backend/app/runtime_security.py | 179 | def ensure_model_cache_directory(path: Path | str) -> Path: | CODE |
| LOW | backend/app/runtime_security.py | 342 | def validate_model_cache_location( | CODE |
| LOW | backend/app/runtime_security.py | 441 | def _validate_sqlite_sidecar_metadata( | CODE |
| LOW | backend/app/runtime_security.py | 456 | def secure_sqlite_sidecar_file(path: Path | str) -> os.stat_result | None: | CODE |
| LOW | backend/app/runtime_security.py | 511 | def secure_sqlite_database_file(database_path: Path | str) -> None: | CODE |
| LOW | backend/app/runtime_security.py | 525 | def atomic_write_private_text(path: Path | str, content: str, *, encoding: str = "utf-8") -> None: | CODE |
| LOW | backend/app/runtime_security.py | 575 | def open_private_binary_exclusive(path: Path | str) -> BinaryIO: | CODE |
| LOW | backend/app/adapters/openai_translate.py | 234 | def write_preprocess_artifact(session: Path, pre: PreprocessResponse) -> Path: | CODE |
| LOW | backend/app/adapters/whisper_asr.py | 31 | def _remove_corrupt_whisper_cache(whisper, name: str, download_root: str | None) -> bool: | CODE |
| LOW | backend/app/adapters/ytdlp.py | 32 | def _bootstrap_bilibili_cookie(cookie_path: Path) -> None: | CODE |
| LOW | backend/app/adapters/ytdlp.py | 105 | def _download_with_format_candidates( | CODE |
| LOW | backend/app/adapters/ffmpeg.py | 229 | def subtitle_style_for_orientation(orientation: str, font: str, lang: str = "zh") -> str: | CODE |
| LOW | backend/app/adapters/audio.py | 18 | def split_audio_by_translation(vocals_file: Path, translation_file: Path, session: Path) -> Path: | CODE |
| LOW | backend/app/adapters/openai_client.py | 6 | def normalize_openai_base_url(base_url: str) -> str: | CODE |
| LOW | backend/app/adapters/local_subtitles.py | 101 | def _uploaded_subtitle_payloads( | CODE |
| LOW⚡ | backend/app/adapters/local_subtitles.py | 134 | def write_uploaded_asr_artifact( | CODE |
| LOW⚡ | backend/app/adapters/local_subtitles.py | 143 | def write_uploaded_asr_fixed_artifact( | CODE |
| LOW⚡ | backend/app/adapters/local_subtitles.py | 152 | def write_uploaded_translation_artifact( | CODE |
| LOW | backend/app/adapters/local_subtitles.py | 164 | def write_uploaded_subtitle_artifacts( | CODE |
| LOW | backend/tests/test_voxcpm.py | 39 | def test_fallback_cache_built_once_and_reused(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_voxcpm.py | 119 | def test_skips_existing_tts_files(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_voxcpm.py | 163 | def test_empty_translation_skips_tts(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_voxcpm.py | 180 | def test_calls_progress_callback(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_voxcpm.py | 217 | def test_model_generate_used_for_own_reference(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_voxcpm.py | 249 | def test_fallback_cache_preserves_wrapper_generation_behavior(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_voxcpm.py | 285 | def test_fallback_cache_is_scoped_by_speaker(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_voxcpm.py | 349 | def test_fallback_keeps_same_speaker_when_only_other_speaker_has_long_reference(mock_load, tmp_path): | CODE |
| LOW | backend/tests/test_youtube.py | 18 | def test_extract_video_id_from_watch_url(): | CODE |
| LOW | backend/tests/test_youtube.py | 22 | def test_extract_video_id_from_shorts_url(): | CODE |
| LOW | backend/tests/test_youtube.py | 61 | def test_youtube_url_accepts_only_explicit_supported_hosts( | CODE |
| LOW⚡ | backend/tests/test_youtube.py | 100 | def test_youtube_url_rejects_deceptive_hosts_schemes_userinfo_and_ports(url): | CODE |
| LOW⚡ | backend/tests/test_youtube.py | 106 | def test_rejects_playlist_only_url(): | CODE |
| LOW⚡ | backend/tests/test_youtube.py | 110 | def test_extract_video_id_from_bilibili_url(): | CODE |
| LOW⚡ | backend/tests/test_youtube.py | 114 | def test_bilibili_url_is_canonicalized_to_the_expected_extractor(): | CODE |
| LOW | backend/tests/test_youtube.py | 134 | def test_bilibili_url_rejects_non_video_generic_extractor_fallbacks(url): | CODE |
| LOW⚡ | backend/tests/test_youtube.py | 145 | def test_extract_video_id_rejects_unknown(): | CODE |
| LOW⚡ | backend/tests/test_youtube.py | 149 | def test_local_upload_helpers_parse_direction_and_task_id(): | CODE |
| LOW⚡ | backend/tests/test_youtube.py | 159 | def test_local_upload_helpers_reject_missing_or_unknown_direction(): | CODE |
| LOW | backend/tests/test_stage_reset.py | 10 | def test_collect_artifact_paths_from_translate(tmp_path): | CODE |
| LOW | backend/tests/test_stage_reset.py | 32 | def test_remove_stage_artifacts_keeps_upstream(tmp_path): | CODE |
| LOW | backend/tests/test_stage_reset.py | 48 | def test_reset_stages_from_only_resets_downstream(monkeypatch, tmp_path): | CODE |
| LOW | backend/tests/test_settings_and_api.py | 46 | def test_openai_key_is_masked(monkeypatch, tmp_path): | CODE |
| LOW | backend/tests/test_settings_and_api.py | 60 | def test_masked_openai_key_is_not_saved_back(monkeypatch, tmp_path): | CODE |
| LOW | backend/tests/test_settings_and_api.py | 81 | def test_openai_key_can_be_cleared(monkeypatch, tmp_path): | CODE |
| LOW | backend/tests/test_settings_and_api.py | 113 | def test_openai_key_save_modes_without_clear(monkeypatch, tmp_path, api_key, expected): | CODE |
| LOW | backend/tests/test_settings_and_api.py | 137 | def test_cookie_response_does_not_leak_content(monkeypatch, tmp_path): | CODE |
| 197 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend/app/worker.py | 3 | CODE | |
| LOW | backend/app/auth.py | 1 | CODE | |
| LOW | backend/app/config.py | 1 | CODE | |
| LOW | backend/app/youtube.py | 1 | CODE | |
| LOW | backend/app/database.py | 1 | CODE | |
| LOW | backend/app/stage_reset.py | 1 | CODE | |
| LOW | backend/app/runtime_checks.py | 1 | CODE | |
| LOW | backend/app/stages.py | 1 | CODE | |
| LOW | backend/app/sources.py | 1 | CODE | |
| LOW | backend/app/pipeline.py | 1 | CODE | |
| LOW | backend/app/main.py | 1 | CODE | |
| LOW | backend/app/devices.py | 1 | CODE | |
| LOW | backend/app/sanitize.py | 1 | CODE | |
| LOW | backend/app/runtime_security.py | 1 | CODE | |
| LOW | backend/app/adapters/asr_sentence_fixer.py | 1 | CODE | |
| LOW | backend/app/adapters/openai_translate.py | 1 | CODE | |
| LOW | backend/app/adapters/whisper_asr.py | 1 | CODE | |
| LOW | backend/app/adapters/ytdlp.py | 1 | CODE | |
| LOW | backend/app/adapters/ffmpeg.py | 1 | CODE | |
| LOW | backend/app/adapters/local_video.py | 1 | CODE | |
| LOW | backend/app/adapters/voxcpm.py | 1 | CODE | |
| LOW | backend/app/adapters/demucs.py | 1 | CODE | |
| LOW | backend/app/adapters/audio.py | 1 | CODE | |
| LOW | backend/app/adapters/openai_client.py | 1 | CODE | |
| LOW | backend/app/adapters/_translate_prompts.py | 1 | CODE | |
| LOW | backend/app/adapters/local_subtitles.py | 1 | CODE | |
| LOW | backend/tests/test_voxcpm.py | 1 | CODE | |
| LOW | backend/tests/conftest.py | 1 | CODE | |
| LOW | backend/tests/test_stage_reset.py | 1 | CODE | |
| LOW | backend/tests/test_stage_reset.py | 3 | CODE | |
| LOW | backend/tests/test_settings_and_api.py | 1 | CODE | |
| LOW | backend/tests/test_auth.py | 1 | CODE | |
| LOW | backend/tests/test_auth.py | 4 | CODE | |
| LOW | backend/tests/test_local_subtitles.py | 1 | CODE | |
| LOW | backend/tests/test_file_permissions.py | 1 | CODE | |
| LOW | backend/tests/test_demucs_adapter.py | 1 | CODE | |
| LOW | backend/tests/test_whisper_asr.py | 1 | CODE | |
| LOW | backend/tests/test_worker.py | 1 | CODE | |
| LOW | backend/tests/test_runtime_checks.py | 1 | CODE | |
| LOW | backend/tests/test_devices.py | 1 | CODE | |
| LOW | backend/tests/test_local_video.py | 1 | CODE | |
| LOW | backend/tests/test_asr_sentence_fixer.py | 1 | CODE | |
| LOW | backend/tests/test_ffmpeg.py | 1 | CODE | |
| LOW | backend/tests/test_translation.py | 1 | CODE | |
| LOW | backend/tests/test_pipeline.py | 1 | CODE | |
| LOW | scripts/run_pipeline.py | 3 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend/app/worker.py | 40 | except Exception: | CODE |
| LOW | backend/app/worker.py | 52 | except Exception: | CODE |
| LOW⚡ | backend/app/worker.py | 66 | except Exception: | CODE |
| LOW⚡ | backend/app/worker.py | 71 | except Exception: | CODE |
| LOW⚡ | backend/app/worker.py | 80 | except Exception as exc: | CODE |
| LOW⚡ | backend/app/worker.py | 88 | except Exception: | CODE |
| LOW | backend/app/database.py | 32 | except Exception: | CODE |
| LOW | backend/app/pipeline.py | 115 | except Exception as exc: | CODE |
| LOW | backend/app/main.py | 381 | except Exception: | CODE |
| LOW | backend/app/main.py | 403 | except Exception: | CODE |
| LOW | backend/app/main.py | 407 | except Exception: | CODE |
| LOW | backend/app/main.py | 459 | except Exception: | CODE |
| LOW | backend/app/main.py | 697 | except Exception as exc: | CODE |
| MEDIUM | backend/app/main.py | 310 | def _ensure_runtime_ready() -> None: | CODE |
| LOW | backend/app/runtime_security.py | 123 | except Exception: | CODE |
| LOW | backend/app/runtime_security.py | 136 | except Exception: | CODE |
| LOW | backend/app/runtime_security.py | 570 | except Exception: | CODE |
| LOW | backend/app/runtime_security.py | 586 | except Exception: | CODE |
| LOW | backend/app/adapters/ytdlp.py | 122 | except Exception as exc: | CODE |
| MEDIUM | backend/tests/test_settings_and_api.py | 752 | def update_settings() -> None: | CODE |
| MEDIUM | backend/tests/test_settings_and_api.py | 831 | def read_settings() -> None: | CODE |
| LOW | backend/tests/test_settings_and_api.py | 760 | except Exception as exc: # pragma: no cover - asserted below | CODE |
| LOW | backend/tests/test_settings_and_api.py | 834 | except Exception as exc: # pragma: no cover - asserted below | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend/app/worker.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | backend/app/database.py | 531 | def update_task(task_id: str, **fields: Any) -> None: | CODE |
| LOW⚡ | backend/app/database.py | 540 | def update_stage(task_id: str, name: str, **fields: Any) -> None: | CODE |
| LOW⚡ | backend/app/database.py | 549 | def set_setting(key: str, value: str) -> None: | CODE |
| LOW | backend/app/main.py | 39 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend/tests/test_settings_and_api.py | 752 | def update_settings() -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend/app/main.py | 367 | CODE | |
| LOW | backend/app/runtime_security.py | 179 | CODE | |
| LOW | backend/app/adapters/voxcpm.py | 96 | CODE | |
| LOW | backend/tests/test_pipeline.py | 247 | CODE | |
| LOW | backend/tests/test_pipeline.py | 258 | CODE | |
| LOW | backend/tests/test_pipeline.py | 259 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend/app/pipeline.py | 446 | def run_task(task_id: str) -> None: | CODE |