Repository Analysis

kyutai-labs/pocket-tts

A TTS that fits in your CPU (and pocket)

16.9 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 9,194 GitHub stars. SynthScan v2.0 examined 13,550 lines of code across 110 source files, recording 161 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 16.9 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.9
Adjusted Score
16.9
Raw Score
100%
Time Factor
2026-08-28
Last Push
9.2K
Stars
Python
Language
13.6K
Lines of Code
110
Files
161
Pattern Hits
2026-08-29
Scan Date
0.04
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 4MEDIUM 15LOW 142

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

Hyper-Verbose Identifiers94 hits · 113 pts
SeverityFileLineSnippetContext
LOWpocket_tts/quantization.py52def _ensure_quantization_engine():CODE
LOWpocket_tts/default_parameters.py59def get_default_text_for_language(language: str | None) -> str:CODE
LOWpocket_tts/default_parameters.py66def get_default_voice_for_language(CODE
LOWpocket_tts/utils/weights_loading.py82def get_training_checkpoint_state_dicts(CODE
LOWpocket_tts/models/text_chunking.py44def _is_decimal_period_boundary(CODE
LOWpocket_tts/models/text_chunking.py92def _segments_from_boundaries(CODE
LOWpocket_tts/models/text_chunking.py105def split_into_best_sentences(CODE
LOWpocket_tts/models/tts_model.py183 def _from_pydantic_config_with_weights(CODE
LOWpocket_tts/models/tts_model.py365 def _run_flow_lm_and_increment_step(CODE
LOWpocket_tts/models/tts_model.py676 def _generate_audio_stream_short_text(CODE
LOWpocket_tts/models/tts_model.py788 def _autoregressive_generation(CODE
LOWpocket_tts/models/tts_model.py825 def _cached_get_state_for_audio_prompt(CODE
LOWpocket_tts/models/tts_model.py831 def get_state_for_audio_prompt(CODE
LOWpocket_tts/data/audio.py44def _audio_read_with_soundfile(filepath: Path) -> tuple[torch.Tensor, int]:CODE
LOWtraining/checkpointing.py125def export_pocket_safetensors(CODE
LOWtraining/tests/test_dataloader.py52def test_rank_sharding_partitions_entries_without_overlap(tmp_path):CODE
LOWtraining/tests/test_dataloader.py59def test_prompt_respects_the_configured_cap(tmp_path):CODE
LOWtraining/tests/test_dataloader.py64def test_batches_have_the_requested_size(tmp_path):CODE
LOWtraining/tests/test_dataloader.py70def test_target_audio_never_exceeds_max_duration(tmp_path):CODE
LOWtraining/tests/test_dataloader.py75def test_unaligned_manifest_still_yields_batches(tmp_path):CODE
LOWtraining/tests/test_dataloader.py83def test_entry_start_offsets_into_a_shared_file(tmp_path):CODE
LOWtraining/tests/test_smoke.py137def test_head_supports_every_time_cond_count(num_time_conds):CODE
LOWtraining/tests/test_smoke.py149def test_head_keeps_released_state_dict_layout():CODE
LOWtraining/tests/test_smoke.py175def test_generate_ragged_matches_batch_of_one():CODE
LOWtraining/tests/test_smoke.py201def test_generate_per_row_eos():CODE
LOWtraining/tests/test_smoke.py214def test_padded_batch_matches_unpadded_under_context_window():CODE
LOWtraining/tests/test_smoke.py246def test_ema_load_drops_untracked_keys():CODE
LOWtraining/tests/test_smoke.py328def test_grad_accum_matches_big_batch():CODE
LOWtraining/tests/test_config_invariants.py30def test_scratch_reaches_the_effective_batch_floor():CODE
LOWtraining/tests/test_config_invariants.py38def test_scratch_runs_past_the_quality_transition():CODE
LOWtraining/tests/test_config_invariants.py42def test_scratch_builds_the_reference_teacher_depth():CODE
LOWtraining/tests/test_config_invariants.py48def test_distill_teacher_is_deeper_than_its_student():CODE
LOWtraining/tests/test_config_invariants.py57def test_distill_teacher_weights_point_at_the_scratch_run():CODE
LOWtraining/tests/test_config_invariants.py69 def test_num_ckpt_keep_zero_is_rejected(self):CODE
LOWtraining/tests/test_config_invariants.py73 def test_zero_frequencies_are_rejected(self):CODE
LOWtraining/tests/test_config_invariants.py78 def test_distillation_without_a_teacher_is_rejected(self):CODE
LOWtraining/tests/test_config_invariants.py82 def test_teacher_config_without_weights_is_rejected(self):CODE
LOWtraining/tests/test_config_invariants.py86 def test_unknown_keys_are_rejected(self):CODE
LOWtraining/tests/test_units.py20 def test_warmup_ends_at_the_configured_lr(self):CODE
LOWtraining/tests/test_units.py26 def test_cosine_decays_to_the_floor_at_max_steps(self):CODE
LOWtraining/tests/test_units.py32 def test_cosine_respects_lr_min_ratio(self):CODE
LOWtraining/tests/test_units.py45 def test_keeps_the_ends_of_the_stack(self):CODE
LOWtraining/tests/test_units.py48 def test_identity_when_depths_match(self):CODE
LOWtraining/tests/test_units.py51 def test_rejects_growing_the_stack(self):CODE
LOWtraining/tests/test_units.py55 def test_shrink_renumbers_kept_layers_contiguously(self):CODE
LOWtraining/tests/test_units.py76 def test_tracks_only_trainable_parameters(self):CODE
LOWtraining/tests/test_units.py82 def test_update_moves_towards_the_live_weights(self):CODE
LOWtraining/tests/test_units.py90 def test_loading_a_partial_shadow_keeps_untracked_weights(self):CODE
LOWtraining/tests/test_units.py104 def test_skip_rate_matches_probability(self):CODE
LOWtraining/tests/test_units.py111 def test_ranks_agree_on_every_draw(self):CODE
LOWtraining/tests/test_units.py126 def test_eval_mode_always_computes_the_full_loss(self):CODE
LOWtraining/tests/test_eval_naming.py19def test_default_name_is_bare():CODE
LOWtraining/tests/test_eval_naming.py33def test_each_knob_marks_the_name(over, fragment):CODE
LOWtraining/tests/test_eval_naming.py37def test_seeds_do_not_collide():CODE
LOWtraining/tests/test_eval_naming.py43def test_every_pair_of_settings_is_distinguishable():CODE
LOWtraining/tests/test_eval_naming.py57def test_step_prefixes_do_not_collide_under_globbing():CODE
LOWtraining/tests/test_eval_naming.py64def test_hf_prompt_root_tags_by_repo_name_not_snapshot_path():CODE
LOWtraining/tests/test_eval_naming.py73def test_local_prompt_root_keeps_directory_tag():CODE
LOWtraining/tests/test_prepare_data.py19def test_utterances_in_one_chapter_share_the_manifest_path(tmp_path, monkeypatch):CODE
LOWtraining/tests/test_prepare_data.py94def test_hf_alignments_join_on_utterance_id_not_path(tmp_path, monkeypatch):CODE
34 more matches not shown…
Decorative Section Separators14 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMpocket_tts/main.py39# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py41# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py220# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py222# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py350# ----------------------------------------------COMMENT
MEDIUMpocket_tts/main.py352# ----------------------------------------------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
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpocket_tts/models/tts_model.py268Load a pre-trained TTS model with specified configuration. This class method loads a complete TTS model includiSTRING
HIGHpocket_tts/models/tts_model.py527Generate complete audio tensor from text input. This method generates the full audio output for the given text STRING
HIGHpocket_tts/models/tts_model.py595Generate audio streaming chunks from text input. This method generates audio from text and yields chunks as theSTRING
HIGHpocket_tts/models/tts_model.py834Create model state conditioned on audio prompt for continuation. This method processes an audio prompt and creaSTRING
Modern Structural Boilerplate14 hits · 14 pts
SeverityFileLineSnippetContext
LOWpocket_tts/quantization.py18logger = logging.getLogger(__name__)CODE
LOWpocket_tts/__init__.py29__all__ = ["TTSModel", "export_model_state"]CODE
LOWpocket_tts/main.py32logger = logging.getLogger(__name__)CODE
LOWpocket_tts/models/text_chunking.py9logger = logging.getLogger(__name__)CODE
LOWpocket_tts/models/tts_model.py52logger = 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/data/audio.py18logger = logging.getLogger(__name__)CODE
LOWtraining/dataloader.py26logger = logging.getLogger(__name__)CODE
LOWtraining/checkpointing.py16logger = logging.getLogger(__name__)CODE
LOWtraining/modules/builders.py27logger = logging.getLogger(__name__)CODE
LOWtraining/modules/model.py41 def _update_latent_stats(self, latents: torch.Tensor, mask: torch.Tensor) -> None:CODE
LOWtraining/modules/utils.py52def set_state_padding(model_state: dict, pad: torch.Tensor) -> None:CODE
LOWscripts/evaluate_quantization.py58logger = logging.getLogger(__name__)CODE
Deep Nesting12 hits · 12 pts
SeverityFileLineSnippetContext
LOWpocket_tts/models/text_chunking.py59CODE
LOWpocket_tts/models/tts_model.py676CODE
LOWtraining/train.py161CODE
LOWtraining/args.py159CODE
LOWtraining/scripts/prepare_data.py56CODE
LOWtraining/scripts/prepare_data.py132CODE
LOWtraining/scripts/prepare_data.py175CODE
LOWtraining/scripts/align_data.py194CODE
LOWtraining/scripts/train_tokenizer.py30CODE
LOWtraining/eval/librispeech.py92CODE
LOWtraining/eval/librispeech.py226CODE
LOWscripts/evaluate_quantization.py516CODE
Excessive Try-Catch Wrapping10 hits · 11 pts
SeverityFileLineSnippetContext
LOWpocket_tts/models/tts_model.py171 except Exception:CODE
LOWpocket_tts/models/tts_model.py234 except Exception:CODE
LOWpocket_tts/models/tts_model.py514 except Exception as e:CODE
LOWpocket_tts/models/tts_model.py774 except Exception as e:CODE
MEDIUMpocket_tts/models/tts_model.py769def run_generation():CODE
LOWtraining/dataloader.py200 except Exception as exc: # noqa: BLE001 — skip unreadable samples, whatever the causeCODE
LOWtraining/scripts/prepare_data.py278 except Exception as exc: # noqa: BLE001 -- dead LibriVox links happenCODE
LOWtraining/scripts/align_data.py258 except Exception as exc: # noqa: BLE001CODE
LOWscripts/evaluate_quantization.py195 except Exception as e:CODE
LOWscripts/evaluate_quantization.py264 except Exception as e:CODE
AI Structural Patterns8 hits · 8 pts
SeverityFileLineSnippetContext
LOWpocket_tts/main.py226CODE
LOWpocket_tts/models/tts_model.py256CODE
LOWpocket_tts/models/mimi.py97CODE
LOWpocket_tts/models/flow_lm.py206CODE
LOWpocket_tts/modules/seanet.py47CODE
LOWpocket_tts/modules/seanet.py119CODE
LOWtraining/scripts/prepare_data.py344CODE
LOWtraining/modules/samplers.py70CODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpocket_tts/__init__.py21# Public methods:COMMENT
LOWscripts/generate_default_voices.py21 model_state_copy = model.get_state_for_audio_prompt(dest)COMMENT
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWpocket_tts/__init__.py16CODE
LOWpocket_tts/__init__.py17CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWpocket_tts/main.py168 # Close the file before reading it back (required on Windows)COMMENT