Repository Analysis

kyutai-labs/pocket-tts

A TTS that fits in your CPU (and pocket)

16.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of kyutai-labs/pocket-tts, a Python project with 7,534 GitHub stars. SynthScan v2.0 examined 7,865 lines of code across 73 source files, recording 77 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 16.2 places this repository in the Moderate 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).

16.2
Adjusted Score
16.2
Raw Score
100%
Time Factor
2026-06-23
Last Push
7.5K
Stars
Python
Language
7.9K
Lines of Code
73
Files
77
Pattern Hits
2026-07-14
Scan Date
0.05
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 4MEDIUM 15LOW 58

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 77 distinct pattern matches across 10 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.

Decorative Section Separators14 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMpocket_tts/main.py39# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py41# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py217# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py219# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py330# ----------------------------------------------COMMENT
MEDIUMpocket_tts/main.py332# ----------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py210# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py212# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py352# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py354# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py389# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py391# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py511# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py513# ---------------------------------------------------------------------------COMMENT
Hyper-Verbose Identifiers33 hits · 34 pts
SeverityFileLineSnippetContext
LOWpocket_tts/quantization.py52def _ensure_quantization_engine():CODE
LOWpocket_tts/default_parameters.py53def get_default_text_for_language(language: str | None) -> str:CODE
LOWpocket_tts/default_parameters.py60def get_default_voice_for_language(language: str | None) -> str:CODE
LOWpocket_tts/models/tts_model.py130 def _from_pydantic_config_with_weights(CODE
LOWpocket_tts/models/tts_model.py317 def _run_flow_lm_and_increment_step(CODE
LOWpocket_tts/models/tts_model.py634 def _generate_audio_stream_short_text(CODE
LOWpocket_tts/models/tts_model.py745 def _autoregressive_generation(CODE
LOWpocket_tts/models/tts_model.py782 def _cached_get_state_for_audio_prompt(CODE
LOWpocket_tts/models/tts_model.py788 def get_state_for_audio_prompt(CODE
LOWpocket_tts/models/tts_model.py965def _segments_from_boundaries(CODE
LOWpocket_tts/models/tts_model.py978def split_into_best_sentences(CODE
LOWtests/test_cli_generate.py19def test_generate_basic_usage(tmp_path):CODE
LOWtests/test_cli_generate.py41def test_generate_with_custom_voice(tmp_path):CODE
LOWtests/test_cli_generate.py68def test_generate_with_custom_parameters(tmp_path):CODE
LOWtests/test_cli_generate.py102def test_generate_verbose_mode(tmp_path):CODE
LOWtests/test_cli_generate.py115def test_generate_default_text(tmp_path):CODE
LOWtests/test_cli_generate.py150def test_generate_multiple_runs(tmp_path):CODE
LOWtests/test_documentation_examples.py74def test_get_state_for_audio_prompt():CODE
LOWtests/test_documentation_examples.py110def test_generate_audio_stream():CODE
LOWtests/test_split_sentences.py14def test_short_text_single_chunk(tokenizer):CODE
LOWtests/test_split_sentences.py26def test_multiple_sentences_split(tokenizer):CODE
LOWtests/test_split_sentences.py35def test_long_sentence_with_commas_is_split(tokenizer):CODE
LOWtests/test_split_sentences.py56def test_long_sentence_with_commas_respects_max_tokens(tokenizer):CODE
LOWtests/test_split_sentences.py75def test_mixed_sentences_and_commas(tokenizer):CODE
LOWtests/test_split_sentences.py90def test_no_commas_no_periods_stays_single_chunk(tokenizer):CODE
LOWtests/test_split_sentences.py100def test_semicolons_and_colons_also_split(tokenizer):CODE
LOWtests/test_split_sentences.py112def test_short_sentence_not_affected_by_comma_splitting(tokenizer):CODE
LOWtests/test_split_sentences.py131def test_oversized_clause_without_commas_still_returns(tokenizer):CODE
LOWtests/test_python_api.py8def test_public_api_exports_only_tts_model():CODE
LOWtests/test_python_api.py12def test_public_api_tts_model_points_to_implementation():CODE
LOWtests/test_python_api.py16def test_public_api_expected_methods_and_properties():CODE
LOWtests/test_quantization.py24def test_quantized_model_produces_audio():CODE
LOWtests/test_quantization.py35def test_quantize_flag_applies_quantization():CODE
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpocket_tts/models/tts_model.py243Load a pre-trained TTS model with specified configuration. This class method loads a complete TTS model includiSTRING
HIGHpocket_tts/models/tts_model.py485Generate complete audio tensor from text input. This method generates the full audio output for the given text STRING
HIGHpocket_tts/models/tts_model.py553Generate audio streaming chunks from text input. This method generates audio from text and yields chunks as theSTRING
HIGHpocket_tts/models/tts_model.py791Create model state conditioned on audio prompt for continuation. This method processes an audio prompt and creaSTRING
Modern Structural Boilerplate9 hits · 10 pts
SeverityFileLineSnippetContext
LOWpocket_tts/quantization.py18logger = logging.getLogger(__name__)CODE
LOWpocket_tts/__init__.py19__all__ = ["TTSModel", "export_model_state"]CODE
LOWpocket_tts/main.py32logger = logging.getLogger(__name__)CODE
LOWpocket_tts/models/tts_model.py50logger = logging.getLogger(__name__)CODE
LOWpocket_tts/models/flow_lm.py14logger = logging.getLogger(__name__)CODE
LOWpocket_tts/conditioners/text.py10logger = logging.getLogger(__name__)CODE
LOWpocket_tts/conditioners/base.py7logger = logging.getLogger(__name__)CODE
LOWpocket_tts/data/audio.py18logger = logging.getLogger(__name__)CODE
LOWscripts/evaluate_quantization.py58logger = logging.getLogger(__name__)CODE
Excessive Try-Catch Wrapping6 hits · 7 pts
SeverityFileLineSnippetContext
LOWpocket_tts/models/tts_model.py205 except Exception:CODE
LOWpocket_tts/models/tts_model.py472 except Exception as e:CODE
LOWpocket_tts/models/tts_model.py732 except Exception as e:CODE
MEDIUMpocket_tts/models/tts_model.py727def run_generation():CODE
LOWscripts/evaluate_quantization.py195 except Exception as e:CODE
LOWscripts/evaluate_quantization.py264 except Exception as e:CODE
AI Structural Patterns5 hits · 5 pts
SeverityFileLineSnippetContext
LOWpocket_tts/main.py223CODE
LOWpocket_tts/models/mimi.py94CODE
LOWpocket_tts/models/flow_lm.py190CODE
LOWpocket_tts/modules/seanet.py45CODE
LOWpocket_tts/modules/seanet.py117CODE
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpocket_tts/__init__.py6CODE
LOWpocket_tts/__init__.py6CODE
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpocket_tts/models/tts_model.py634CODE
LOWscripts/evaluate_quantization.py516CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWpocket_tts/main.py166 # Close the file before reading it back (required on Windows)COMMENT
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWscripts/generate_default_voices.py21 model_state_copy = model.get_state_for_audio_prompt(dest)COMMENT