Repository Analysis

liuzhao1225/YouDub-webui

Open-source AI video localization and dubbing for YouTube/Bilibili: speech recognition, subtitle translation, voice cloning, audio mixing and rendering. 开源 AI 视频翻译配音工具。

14.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,376 GitHub stars. SynthScan v2.0 examined 31,671 lines of code across 100 source files, recording 452 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 14.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).

14.3
Adjusted Score
14.3
Raw Score
100%
Time Factor
2026-08-26
Last Push
5.4K
Stars
Python
Language
31.7K
Lines of Code
100
Files
452
Pattern Hits
2026-08-29
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 449

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 452 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 Identifiers350 hits · 344 pts
SeverityFileLineSnippetContext
LOWbackend/app/auth.py107def validate_auth_configuration() -> AuthSettings:CODE
LOWbackend/app/config.py18def configure_windows_ffmpeg_dll_directory() -> None:CODE
LOWbackend/app/config.py48def _load_runtime_environment(repo_root: Path) -> None:CODE
LOWbackend/app/gpu_memory.py76def release_after_stage_enabled() -> bool:CODE
LOWbackend/app/database.py162def delete_expired_auth_sessions(expires_before: str) -> int:CODE
LOWbackend/app/database.py171def reserve_auth_login_attempt(CODE
LOWbackend/app/database.py218def delete_auth_login_attempt(client_hash: str) -> bool:CODE
LOWbackend/app/database.py227def backfill_titles_from_metadata() -> None:CODE
LOWbackend/app/pipeline.py227 def _write_uploaded_asr_artifact(self, task: dict) -> Path:CODE
LOWbackend/app/pipeline.py283 def _log_release_report_preserving_error(CODE
LOWbackend/app/pipeline.py296 def _log_messages_preserving_error(CODE
LOWbackend/app/pipeline.py325 def _log_secondary_release_failure(CODE
LOWbackend/app/main.py110def normalize_translate_concurrency(value: str) -> str:CODE
LOWbackend/app/main.py146async def redact_login_validation_error(CODE
LOWbackend/app/main.py204def _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.py244def write_preprocess_artifact(session: Path, pre: PreprocessResponse) -> Path:CODE
LOWbackend/app/adapters/whisper_asr.py38def _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.py109def _download_with_format_candidates(CODE
LOWbackend/app/adapters/ffmpeg.py228def subtitle_style_for_orientation(orientation: str, font: str, lang: str = "zh") -> str:CODE
LOWbackend/app/adapters/voxcpm.py114def _write_original_target_audio(CODE
LOWbackend/app/adapters/audio.py20def 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.py102def _uploaded_subtitle_payloads(CODE
LOWbackend/app/adapters/local_subtitles.py135def write_uploaded_asr_artifact(CODE
LOWbackend/app/adapters/local_subtitles.py144def write_uploaded_asr_fixed_artifact(CODE
LOWbackend/app/adapters/local_subtitles.py153def write_uploaded_translation_artifact(CODE
LOWbackend/app/adapters/local_subtitles.py165def write_uploaded_subtitle_artifacts(CODE
LOWbackend/tests/test_voxcpm.py16def test_release_model_clears_cached_model(monkeypatch):CODE
LOWbackend/tests/test_voxcpm.py51def test_fallback_cache_built_once_and_reused(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py131def test_skips_existing_tts_files(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py175def test_empty_translation_skips_tts(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py192def test_original_mode_copies_original_audio_with_non_empty_caption(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py246def test_legacy_empty_target_copies_original_audio_without_loading_model(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py270def test_original_target_audio_writes_exact_private_range(tmp_path):CODE
LOWbackend/tests/test_voxcpm.py292def test_original_target_audio_rejects_partially_out_of_range(tmp_path):CODE
LOWbackend/tests/test_voxcpm.py312def test_original_target_audio_rejects_fully_out_of_range(tmp_path):CODE
LOWbackend/tests/test_voxcpm.py332def test_original_target_audio_accepts_end_at_source_boundary(tmp_path):CODE
LOWbackend/tests/test_voxcpm.py351def test_original_target_audio_accepts_sub_millisecond_rounded_tail(tmp_path):CODE
LOWbackend/tests/test_voxcpm.py370def test_original_target_audio_rejects_one_millisecond_tail_overflow(tmp_path):CODE
LOWbackend/tests/test_voxcpm.py390def test_original_target_audio_rejects_quantized_one_millisecond_tail_overflow(CODE
LOWbackend/tests/test_voxcpm.py417def test_original_target_audio_rejects_symlink_output(tmp_path):CODE
LOWbackend/tests/test_voxcpm.py439def test_original_segments_are_excluded_from_tts_fallback_references(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py498def test_calls_progress_callback(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py535def test_model_generate_used_for_own_reference(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py567def test_fallback_cache_preserves_wrapper_generation_behavior(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py603def test_fallback_cache_is_scoped_by_speaker(mock_load, tmp_path):CODE
LOWbackend/tests/test_voxcpm.py667def test_fallback_keeps_same_speaker_when_only_other_speaker_has_long_reference(mock_load, tmp_path):CODE
LOWbackend/tests/test_youtube.py19def test_extract_video_id_from_watch_url():CODE
290 more matches not shown…
Unused Imports52 hits · 48 pts
SeverityFileLineSnippetContext
LOWbackend/app/worker.py3CODE
LOWbackend/app/auth.py1CODE
LOWbackend/app/config.py1CODE
LOWbackend/app/youtube.py1CODE
LOWbackend/app/gpu_memory.py1CODE
LOWbackend/app/database.py1CODE
LOWbackend/app/stage_reset.py1CODE
LOWbackend/app/runtime_checks.py1CODE
LOWbackend/app/audio_mode.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_audio.py1CODE
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_gpu_memory.py1CODE
LOWbackend/tests/test_audio_mode.py1CODE
LOWbackend/tests/test_config.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 Wrapping36 hits · 44 pts
SeverityFileLineSnippetContext
LOWbackend/app/worker.py40 except Exception:CODE
LOWbackend/app/worker.py52 except Exception:CODE
LOWbackend/app/worker.py71 except Exception:CODE
LOWbackend/app/worker.py76 except Exception:CODE
LOWbackend/app/worker.py85 except Exception as exc:CODE
LOWbackend/app/worker.py93 except Exception:CODE
LOWbackend/app/gpu_memory.py106 except Exception as exc:CODE
LOWbackend/app/database.py34 except Exception:CODE
LOWbackend/app/pipeline.py129 except Exception as exc:CODE
LOWbackend/app/pipeline.py252 except Exception as stage_exc:CODE
LOWbackend/app/pipeline.py255 except Exception as release_exc:CODE
LOWbackend/app/pipeline.py265 except Exception as release_exc:CODE
LOWbackend/app/pipeline.py306 except Exception as log_exc:CODE
LOWbackend/app/pipeline.py319 except Exception:CODE
LOWbackend/app/pipeline.py334 except Exception:CODE
LOWbackend/app/pipeline.py596 except Exception as task_exc:CODE
LOWbackend/app/pipeline.py599 except Exception as release_exc:CODE
LOWbackend/app/pipeline.py609 except Exception as release_exc:CODE
LOWbackend/app/pipeline.py612 except Exception as task_read_exc:CODE
LOWbackend/app/pipeline.py628 except Exception as task_update_exc:CODE
LOWbackend/app/main.py401 except Exception:CODE
LOWbackend/app/main.py423 except Exception:CODE
LOWbackend/app/main.py427 except Exception:CODE
LOWbackend/app/main.py482 except Exception:CODE
LOWbackend/app/main.py726 except Exception as exc:CODE
MEDIUMbackend/app/main.py311def _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.py126 except Exception as exc:CODE
LOWbackend/app/adapters/ffmpeg.py323 except Exception:CODE
MEDIUMbackend/tests/test_settings_and_api.py943def update_settings() -> None:CODE
MEDIUMbackend/tests/test_settings_and_api.py1022def read_settings() -> None:CODE
LOWbackend/tests/test_settings_and_api.py951 except Exception as exc: # pragma: no cover - asserted belowCODE
LOWbackend/tests/test_settings_and_api.py1025 except Exception as exc: # pragma: no cover - asserted belowCODE
Modern Structural Boilerplate7 hits · 8 pts
SeverityFileLineSnippetContext
LOWbackend/app/worker.py17logger = logging.getLogger(__name__)CODE
LOWbackend/app/database.py616def update_task(task_id: str, **fields: Any) -> None:CODE
LOWbackend/app/database.py625def update_stage(task_id: str, name: str, **fields: Any) -> None:CODE
LOWbackend/app/database.py634def set_setting(key: str, value: str) -> None:CODE
LOWbackend/app/pipeline.py20logger = logging.getLogger(__name__)CODE
LOWbackend/app/main.py39logger = logging.getLogger(__name__)CODE
LOWbackend/tests/test_settings_and_api.py943 def update_settings() -> None:CODE
Deep Nesting6 hits · 4 pts
SeverityFileLineSnippetContext
LOWbackend/app/main.py387CODE
LOWbackend/app/runtime_security.py179CODE
LOWbackend/app/adapters/voxcpm.py168CODE
LOWbackend/tests/test_pipeline.py682CODE
LOWbackend/tests/test_pipeline.py693CODE
LOWbackend/tests/test_pipeline.py694CODE
Overly Generic Function Names1 hit · 2 pts
SeverityFileLineSnippetContext
LOWbackend/app/pipeline.py592def run_task(task_id: str) -> None:CODE