Repository Analysis

liuzhao1225/YouDub-webui

开源 AI 视频本地化工具:自动完成 YouTube/Bilibili 视频下载、字幕识别与翻译、语音克隆配音、音轨混合和字幕压制。

12.3 Low AI signal View on GitHub

Analysis Overview

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

12.3
Adjusted Score
12.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.1K
Stars
Python
Language
27.3K
Lines of Code
94
Files
339
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 3LOW 336

Directory Score Breakdown

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.

Pattern Findings

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.

Hyper-Verbose Identifiers257 hits · 252 pts
SeverityFileLineSnippetContext
LOWbackend/app/auth.py107def validate_auth_configuration() -> AuthSettings:CODE
LOWbackend/app/config.py15def _load_runtime_environment(repo_root: Path) -> None:CODE
LOWbackend/app/database.py155def delete_expired_auth_sessions(expires_before: str) -> int:CODE
LOWbackend/app/database.py164def reserve_auth_login_attempt(CODE
LOWbackend/app/database.py211def delete_auth_login_attempt(client_hash: str) -> bool:CODE
LOWbackend/app/database.py220def backfill_titles_from_metadata() -> None:CODE
LOWbackend/app/pipeline.py183 def _write_uploaded_asr_artifact(self, task: dict) -> Path:CODE
LOWbackend/app/main.py109def normalize_translate_concurrency(value: str) -> str:CODE
LOWbackend/app/main.py145async def redact_login_validation_error(CODE
LOWbackend/app/main.py203def _clear_replaced_login_cookie(CODE
LOWbackend/app/devices.py104def _resolve_configured_device(value: str, setting_name: str) -> str:CODE
LOWbackend/app/devices.py145def validate_device_available(selected_device: str, setting_name: str = "DEVICE") -> None:CODE
LOWbackend/app/runtime_security.py93def _validate_directory_metadata(path: Path, metadata: os.stat_result) -> None:CODE
LOWbackend/app/runtime_security.py107def _secure_open_fd_without_mode_change(path: Path, *, directory: bool) -> int:CODE
LOWbackend/app/runtime_security.py179def ensure_model_cache_directory(path: Path | str) -> Path:CODE
LOWbackend/app/runtime_security.py342def validate_model_cache_location(CODE
LOWbackend/app/runtime_security.py441def _validate_sqlite_sidecar_metadata(CODE
LOWbackend/app/runtime_security.py456def secure_sqlite_sidecar_file(path: Path | str) -> os.stat_result | None:CODE
LOWbackend/app/runtime_security.py511def secure_sqlite_database_file(database_path: Path | str) -> None:CODE
LOWbackend/app/runtime_security.py525def atomic_write_private_text(path: Path | str, content: str, *, encoding: str = "utf-8") -> None:CODE
LOWbackend/app/runtime_security.py575def open_private_binary_exclusive(path: Path | str) -> BinaryIO:CODE
LOWbackend/app/adapters/openai_translate.py234def write_preprocess_artifact(session: Path, pre: PreprocessResponse) -> Path:CODE
LOWbackend/app/adapters/whisper_asr.py31def _remove_corrupt_whisper_cache(whisper, name: str, download_root: str | None) -> bool:CODE
LOWbackend/app/adapters/ytdlp.py32def _bootstrap_bilibili_cookie(cookie_path: Path) -> None:CODE
LOWbackend/app/adapters/ytdlp.py105def _download_with_format_candidates(CODE
LOWbackend/app/adapters/ffmpeg.py229def subtitle_style_for_orientation(orientation: str, font: str, lang: str = "zh") -> str:CODE
LOWbackend/app/adapters/audio.py18def split_audio_by_translation(vocals_file: Path, translation_file: Path, session: Path) -> Path:CODE
LOWbackend/app/adapters/openai_client.py6def normalize_openai_base_url(base_url: str) -> str:CODE
LOWbackend/app/adapters/local_subtitles.py101def _uploaded_subtitle_payloads(CODE
LOWbackend/app/adapters/local_subtitles.py134def write_uploaded_asr_artifact(CODE
LOWbackend/app/adapters/local_subtitles.py143def write_uploaded_asr_fixed_artifact(CODE
LOWbackend/app/adapters/local_subtitles.py152def write_uploaded_translation_artifact(CODE
LOWbackend/app/adapters/local_subtitles.py164def write_uploaded_subtitle_artifacts(CODE
LOWbackend/tests/test_voxcpm.py39def test_fallback_cache_built_once_and_reused(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py119def test_skips_existing_tts_files(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py163def test_empty_translation_skips_tts(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py180def test_calls_progress_callback(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py217def test_model_generate_used_for_own_reference(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py249def test_fallback_cache_preserves_wrapper_generation_behavior(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py285def test_fallback_cache_is_scoped_by_speaker(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py349def test_fallback_keeps_same_speaker_when_only_other_speaker_has_long_reference(mock_load, tmp_path):CODE
LOWbackend/tests/test_youtube.py18def test_extract_video_id_from_watch_url():CODE
LOWbackend/tests/test_youtube.py22def test_extract_video_id_from_shorts_url():CODE
LOWbackend/tests/test_youtube.py61def test_youtube_url_accepts_only_explicit_supported_hosts(CODE
LOWbackend/tests/test_youtube.py100def test_youtube_url_rejects_deceptive_hosts_schemes_userinfo_and_ports(url):CODE
LOWbackend/tests/test_youtube.py106def test_rejects_playlist_only_url():CODE
LOWbackend/tests/test_youtube.py110def test_extract_video_id_from_bilibili_url():CODE
LOWbackend/tests/test_youtube.py114def test_bilibili_url_is_canonicalized_to_the_expected_extractor():CODE
LOWbackend/tests/test_youtube.py134def test_bilibili_url_rejects_non_video_generic_extractor_fallbacks(url):CODE
LOWbackend/tests/test_youtube.py145def test_extract_video_id_rejects_unknown():CODE
LOWbackend/tests/test_youtube.py149def test_local_upload_helpers_parse_direction_and_task_id():CODE
LOWbackend/tests/test_youtube.py159def test_local_upload_helpers_reject_missing_or_unknown_direction():CODE
LOWbackend/tests/test_stage_reset.py10def test_collect_artifact_paths_from_translate(tmp_path):CODE
LOWbackend/tests/test_stage_reset.py32def test_remove_stage_artifacts_keeps_upstream(tmp_path):CODE
LOWbackend/tests/test_stage_reset.py48def test_reset_stages_from_only_resets_downstream(monkeypatch, tmp_path):CODE
LOWbackend/tests/test_settings_and_api.py46def test_openai_key_is_masked(monkeypatch, tmp_path):CODE
LOWbackend/tests/test_settings_and_api.py60def test_masked_openai_key_is_not_saved_back(monkeypatch, tmp_path):CODE
LOWbackend/tests/test_settings_and_api.py81def test_openai_key_can_be_cleared(monkeypatch, tmp_path):CODE
LOWbackend/tests/test_settings_and_api.py113def test_openai_key_save_modes_without_clear(monkeypatch, tmp_path, api_key, expected):CODE
LOWbackend/tests/test_settings_and_api.py137def test_cookie_response_does_not_leak_content(monkeypatch, tmp_path):CODE
197 more matches not shown…
Unused Imports46 hits · 44 pts
SeverityFileLineSnippetContext
LOWbackend/app/worker.py3CODE
LOWbackend/app/auth.py1CODE
LOWbackend/app/config.py1CODE
LOWbackend/app/youtube.py1CODE
LOWbackend/app/database.py1CODE
LOWbackend/app/stage_reset.py1CODE
LOWbackend/app/runtime_checks.py1CODE
LOWbackend/app/stages.py1CODE
LOWbackend/app/sources.py1CODE
LOWbackend/app/pipeline.py1CODE
LOWbackend/app/main.py1CODE
LOWbackend/app/devices.py1CODE
LOWbackend/app/sanitize.py1CODE
LOWbackend/app/runtime_security.py1CODE
LOWbackend/app/adapters/asr_sentence_fixer.py1CODE
LOWbackend/app/adapters/openai_translate.py1CODE
LOWbackend/app/adapters/whisper_asr.py1CODE
LOWbackend/app/adapters/ytdlp.py1CODE
LOWbackend/app/adapters/ffmpeg.py1CODE
LOWbackend/app/adapters/local_video.py1CODE
LOWbackend/app/adapters/voxcpm.py1CODE
LOWbackend/app/adapters/demucs.py1CODE
LOWbackend/app/adapters/audio.py1CODE
LOWbackend/app/adapters/openai_client.py1CODE
LOWbackend/app/adapters/_translate_prompts.py1CODE
LOWbackend/app/adapters/local_subtitles.py1CODE
LOWbackend/tests/test_voxcpm.py1CODE
LOWbackend/tests/conftest.py1CODE
LOWbackend/tests/test_stage_reset.py1CODE
LOWbackend/tests/test_stage_reset.py3CODE
LOWbackend/tests/test_settings_and_api.py1CODE
LOWbackend/tests/test_auth.py1CODE
LOWbackend/tests/test_auth.py4CODE
LOWbackend/tests/test_local_subtitles.py1CODE
LOWbackend/tests/test_file_permissions.py1CODE
LOWbackend/tests/test_demucs_adapter.py1CODE
LOWbackend/tests/test_whisper_asr.py1CODE
LOWbackend/tests/test_worker.py1CODE
LOWbackend/tests/test_runtime_checks.py1CODE
LOWbackend/tests/test_devices.py1CODE
LOWbackend/tests/test_local_video.py1CODE
LOWbackend/tests/test_asr_sentence_fixer.py1CODE
LOWbackend/tests/test_ffmpeg.py1CODE
LOWbackend/tests/test_translation.py1CODE
LOWbackend/tests/test_pipeline.py1CODE
LOWscripts/run_pipeline.py3CODE
Excessive Try-Catch Wrapping23 hits · 27 pts
SeverityFileLineSnippetContext
LOWbackend/app/worker.py40 except Exception:CODE
LOWbackend/app/worker.py52 except Exception:CODE
LOWbackend/app/worker.py66 except Exception:CODE
LOWbackend/app/worker.py71 except Exception:CODE
LOWbackend/app/worker.py80 except Exception as exc:CODE
LOWbackend/app/worker.py88 except Exception:CODE
LOWbackend/app/database.py32 except Exception:CODE
LOWbackend/app/pipeline.py115 except Exception as exc:CODE
LOWbackend/app/main.py381 except Exception:CODE
LOWbackend/app/main.py403 except Exception:CODE
LOWbackend/app/main.py407 except Exception:CODE
LOWbackend/app/main.py459 except Exception:CODE
LOWbackend/app/main.py697 except Exception as exc:CODE
MEDIUMbackend/app/main.py310def _ensure_runtime_ready() -> None:CODE
LOWbackend/app/runtime_security.py123 except Exception:CODE
LOWbackend/app/runtime_security.py136 except Exception:CODE
LOWbackend/app/runtime_security.py570 except Exception:CODE
LOWbackend/app/runtime_security.py586 except Exception:CODE
LOWbackend/app/adapters/ytdlp.py122 except Exception as exc:CODE
MEDIUMbackend/tests/test_settings_and_api.py752def update_settings() -> None:CODE
MEDIUMbackend/tests/test_settings_and_api.py831def read_settings() -> None:CODE
LOWbackend/tests/test_settings_and_api.py760 except Exception as exc: # pragma: no cover - asserted belowCODE
LOWbackend/tests/test_settings_and_api.py834 except Exception as exc: # pragma: no cover - asserted belowCODE
Modern Structural Boilerplate6 hits · 7 pts
SeverityFileLineSnippetContext
LOWbackend/app/worker.py17logger = logging.getLogger(__name__)CODE
LOWbackend/app/database.py531def update_task(task_id: str, **fields: Any) -> None:CODE
LOWbackend/app/database.py540def update_stage(task_id: str, name: str, **fields: Any) -> None:CODE
LOWbackend/app/database.py549def set_setting(key: str, value: str) -> None:CODE
LOWbackend/app/main.py39logger = logging.getLogger(__name__)CODE
LOWbackend/tests/test_settings_and_api.py752 def update_settings() -> None:CODE
Deep Nesting6 hits · 6 pts
SeverityFileLineSnippetContext
LOWbackend/app/main.py367CODE
LOWbackend/app/runtime_security.py179CODE
LOWbackend/app/adapters/voxcpm.py96CODE
LOWbackend/tests/test_pipeline.py247CODE
LOWbackend/tests/test_pipeline.py258CODE
LOWbackend/tests/test_pipeline.py259CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWbackend/app/pipeline.py446def run_task(task_id: str) -> None:CODE