AI Slop Code RIsk Monitor

kyutai-labs/pocket-tts

A TTS that fits in your CPU (and pocket)

19.3 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for kyutai-labs/pocket-tts, a Python project with 9,862 GitHub stars. SynthScan examined 17,626 lines of code across 132 source files, recording 233 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 19.3 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.3
Adjusted Signal
19.3
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
9.9K
Stars
Python
Language
17.6K
Lines of Code
132
Files
233
Pattern Hits
2026-10-12
Scan Date
0.09
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 45.0/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 169 finding(s).

Hallucinated Dependency & Supply Chain Risk 3.6/100 · LOW

Are imports declared and package/API names verified? 13 finding(s).

Agent Over-Engineering Ratio 55.3/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 193 finding(s).

PR Review Velocity Impact 60.2/100 · HIGH

Which changes need focused human review? 233 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 12MEDIUM 16LOW 205

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 233 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers133 hits · 158 pts
SeverityFileLineSnippetContext
LOWpocket_tts/quantization.py58def _ensure_quantization_engine():CODE
LOWpocket_tts/default_parameters.py65def get_default_text_for_language(language: str | None) -> str:CODE
LOWpocket_tts/default_parameters.py72def get_default_voice_for_language(CODE
LOWpocket_tts/utils/weights_loading.py82def get_training_checkpoint_state_dicts(CODE
LOWpocket_tts/models/text_chunking.py61def _ensure_terminal_punctuation(text: str) -> str:CODE
LOWpocket_tts/models/text_chunking.py82def _is_decimal_period_boundary(CODE
LOWpocket_tts/models/text_chunking.py130def _segments_from_boundaries(CODE
LOWpocket_tts/models/text_chunking.py143def split_into_best_sentences(CODE
LOWpocket_tts/models/tts_model.py210 def _from_pydantic_config_with_weights(CODE
LOWpocket_tts/models/tts_model.py390 def _run_flow_lm_and_increment_step(CODE
LOWpocket_tts/models/tts_model.py749 def _generate_audio_stream_short_text(CODE
LOWpocket_tts/models/tts_model.py866 def _autoregressive_generation(CODE
LOWpocket_tts/models/tts_model.py916 def _cached_get_state_for_audio_prompt(CODE
LOWpocket_tts/models/tts_model.py922 def get_state_for_audio_prompt(CODE
LOWpocket_tts/data/audio.py45def _audio_read_with_soundfile(filepath: Path) -> tuple[torch.Tensor, int]:CODE
LOWtraining/checkpointing.py132def export_pocket_safetensors(CODE
LOW⚡training/tests/test_dataloader.py56def test_rank_sharding_partitions_entries_without_overlap(tmp_path: Path):CODE
LOW⚡training/tests/test_dataloader.py63def test_prompt_respects_the_configured_cap(tmp_path: Path):CODE
LOW⚡training/tests/test_dataloader.py68def test_batches_have_the_requested_size(tmp_path: Path):CODE
LOW⚡training/tests/test_dataloader.py74def test_target_audio_never_exceeds_max_duration(tmp_path: Path):CODE
LOW⚡training/tests/test_dataloader.py79def test_unaligned_manifest_is_refused(tmp_path: Path):CODE
LOW⚡training/tests/test_dataloader.py87def test_entry_start_offsets_into_a_shared_file(tmp_path: Path):CODE
LOWtraining/tests/test_dataloader.py137def test_shard_smaller_than_the_bucket_pool_names_the_knobs(tmp_path: Path):CODE
LOWtraining/tests/test_dataloader.py143def test_startup_check_rejects_manifests_too_small_for_the_loaders(tmp_path: Path):CODE
LOWtraining/tests/test_smoke.py141def test_head_supports_every_time_cond_count(num_time_conds: int):CODE
LOWtraining/tests/test_smoke.py153def test_head_keeps_released_state_dict_layout():CODE
LOWtraining/tests/test_smoke.py179def test_generate_ragged_matches_batch_of_one():CODE
LOWtraining/tests/test_smoke.py205def test_generate_per_row_eos():CODE
LOWtraining/tests/test_smoke.py218def test_padded_batch_matches_unpadded_under_context_window():CODE
LOWtraining/tests/test_smoke.py250def test_ema_load_drops_untracked_keys():CODE
LOWtraining/tests/test_smoke.py334def test_grad_accum_matches_big_batch():CODE
LOWtraining/tests/test_smoke.py359def test_train_tokenizer_matches_the_released_spec(tmp_path: Path):CODE
LOW⚡training/tests/test_config_invariants.py31def test_scratch_reaches_the_effective_batch_floor():CODE
LOW⚡training/tests/test_config_invariants.py39def test_scratch_runs_past_the_quality_transition():CODE
LOW⚡training/tests/test_config_invariants.py43def test_scratch_builds_the_reference_teacher_depth():CODE
LOW⚡training/tests/test_config_invariants.py49def test_distill_teacher_is_deeper_than_its_student():CODE
LOW⚡training/tests/test_config_invariants.py58def test_distill_teacher_weights_point_at_the_scratch_run():CODE
LOW⚡training/tests/test_config_invariants.py70 def test_num_ckpt_keep_zero_is_rejected(self):CODE
LOW⚡training/tests/test_config_invariants.py74 def test_zero_frequencies_are_rejected(self):CODE
LOW⚡training/tests/test_config_invariants.py80 def test_distillation_without_a_teacher_is_rejected(self):CODE
LOW⚡training/tests/test_config_invariants.py84 def test_teacher_config_without_weights_is_rejected(self):CODE
LOW⚡training/tests/test_config_invariants.py88 def test_unknown_keys_are_rejected(self):CODE
LOWtraining/tests/test_loader_signals.py17def test_loader_processes_survive_stop_signals() -> None:CODE
LOW⚡training/tests/test_units.py22 def test_warmup_ends_at_the_configured_lr(self):CODE
LOW⚡training/tests/test_units.py28 def test_cosine_decays_to_the_floor_at_max_steps(self):CODE
LOW⚡training/tests/test_units.py34 def test_cosine_respects_lr_min_ratio(self):CODE
LOW⚡training/tests/test_units.py47 def test_keeps_the_ends_of_the_stack(self):CODE
LOW⚡training/tests/test_units.py50 def test_identity_when_depths_match(self):CODE
LOW⚡training/tests/test_units.py53 def test_rejects_growing_the_stack(self):CODE
LOW⚡training/tests/test_units.py57 def test_shrink_renumbers_kept_layers_contiguously(self):CODE
LOW⚡training/tests/test_units.py78 def test_tracks_only_trainable_parameters(self):CODE
LOW⚡training/tests/test_units.py84 def test_update_moves_towards_the_live_weights(self):CODE
LOW⚡training/tests/test_units.py92 def test_loading_a_partial_shadow_keeps_untracked_weights(self):CODE
LOWtraining/tests/test_units.py106 def test_skip_rate_matches_probability(self):CODE
LOWtraining/tests/test_units.py113 def test_ranks_agree_on_every_draw(self):CODE
LOWtraining/tests/test_units.py128 def test_eval_mode_always_computes_the_full_loss(self):CODE
LOW⚡training/tests/test_units.py142 def test_learned_temperature_gets_a_gradient(self):CODE
LOW⚡training/tests/test_units.py148 def test_fixed_temperature_keeps_the_resumed_value(self):CODE
LOW⚡training/tests/test_units.py157 def test_decode_is_the_head_output(self):CODE
LOWtraining/tests/test_eval_naming.py19def test_default_name_is_bare():CODE
73 more matches not shown…
Decorative Section Separators14 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUM⚡pocket_tts/main.py41# ------------------------------------------------------COMMENT
MEDIUM⚡pocket_tts/main.py43# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py258# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py260# ------------------------------------------------------COMMENT
MEDIUMpocket_tts/main.py389# ----------------------------------------------COMMENT
MEDIUMpocket_tts/main.py391# ----------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py219# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py221# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py368# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py370# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py405# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py407# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py527# ---------------------------------------------------------------------------COMMENT
MEDIUMscripts/evaluate_quantization.py529# ---------------------------------------------------------------------------COMMENT
Cross-File Repetition5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHtraining/dataloader/encode.py0data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., "STRING
HIGHtraining/dataloader/subproc.py0data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., "STRING
HIGHtraining/dataloader/types.py0data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., "STRING
HIGHtraining/dataloader/loader.py0data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., "STRING
HIGHtraining/dataloader/audio.py0data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., "STRING
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHpocket_tts/models/tts_model.py297Load a pre-trained TTS model with specified configuration. This class method loads a complete TTS model includiSTRING
HIGHpocket_tts/models/tts_model.py583Generate complete audio tensor from text input. This method generates the full audio output for the given text STRING
HIGHpocket_tts/models/tts_model.py652Generate audio streaming chunks from text input. This method generates audio from text and yields chunks as theSTRING
HIGHpocket_tts/models/tts_model.py925Create model state conditioned on audio prompt for continuation. This method processes an audio prompt and creaSTRING
Modern Structural Boilerplate18 hits · 18 pts
SeverityFileLineSnippetContext
LOWpocket_tts/quantization.py21logger = logging.getLogger(__name__)CODE
LOWpocket_tts/__init__.py12__all__ = ["TTSModel", "export_model_state"]CODE
LOW⚡pocket_tts/main.py34logger = logging.getLogger(__name__)CODE
LOWpocket_tts/models/text_chunking.py12logger = logging.getLogger(__name__)CODE
LOWpocket_tts/models/tts_model.py58logger = logging.getLogger(__name__)CODE
LOWpocket_tts/models/flow_lm.py15logger = logging.getLogger(__name__)CODE
LOWpocket_tts/modules/text_conditioner.py11logger = logging.getLogger(__name__)CODE
LOWpocket_tts/data/audio.py19logger = logging.getLogger(__name__)CODE
LOWtraining/checkpointing.py18logger = logging.getLogger(__name__)CODE
LOWtraining/modules/builders.py28logger = logging.getLogger(__name__)CODE
LOWtraining/dataloader/encode.py17logger = logging.getLogger(__name__)CODE
LOWtraining/dataloader/manifest.py9logger = logging.getLogger(__name__)CODE
LOWtraining/dataloader/subproc.py23logger = logging.getLogger(__name__)CODE
LOWtraining/dataloader/__init__.py10__all__ = [CODE
LOWtraining/dataloader/types.py15logger = logging.getLogger(__name__)CODE
LOWtraining/dataloader/loader.py29logger = logging.getLogger(__name__)CODE
LOWtraining/dataloader/audio.py18logger = logging.getLogger(__name__)CODE
LOWscripts/evaluate_quantization.py65logger = logging.getLogger(__name__)CODE
Deep Nesting16 hits · 16 pts
SeverityFileLineSnippetContext
LOWpocket_tts/models/text_chunking.py97CODE
LOWpocket_tts/models/tts_model.py167CODE
LOWpocket_tts/models/tts_model.py503CODE
LOWpocket_tts/models/tts_model.py749CODE
LOWtraining/train.py166CODE
LOWtraining/args.py200CODE
LOWtraining/scripts/prepare_data.py56CODE
LOWtraining/scripts/prepare_data.py132CODE
LOWtraining/scripts/prepare_data.py175CODE
LOWtraining/scripts/convert_tokenizer.py45CODE
LOWtraining/scripts/align_data.py205CODE
LOWtraining/scripts/train_tokenizer.py39CODE
LOWtraining/eval/release_checks.py243CODE
LOWtraining/eval/librispeech.py102CODE
LOWtraining/eval/librispeech.py268CODE
LOWscripts/evaluate_quantization.py532CODE
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHpocket_tts/quantization.py43except ImportError:CODE
HIGHtraining/scripts/align_data.py197except FileNotFoundError:CODE
HIGHtraining/eval/librispeech.py312except ImportError:CODE
Unused Imports13 hits · 13 pts
SeverityFileLineSnippetContext
LOWpocket_tts/__init__.py1CODE
LOWpocket_tts/__init__.py2CODE
LOWtraining/args.py10CODE
LOWtraining/dataloader/subproc.py10CODE
LOWtraining/dataloader/__init__.py3CODE
LOWtraining/dataloader/__init__.py4CODE
LOWtraining/dataloader/__init__.py5CODE
LOWtraining/dataloader/__init__.py5CODE
LOWtraining/dataloader/__init__.py6CODE
LOWtraining/dataloader/__init__.py6CODE
LOWtraining/dataloader/__init__.py7CODE
LOWtraining/dataloader/__init__.py8CODE
LOWtraining/dataloader/__init__.py8CODE
Excessive Try-Catch Wrapping11 hits · 13 pts
SeverityFileLineSnippetContext
LOWpocket_tts/models/tts_model.py196 except Exception:CODE
LOWpocket_tts/models/tts_model.py261 except Exception:CODE
LOWpocket_tts/models/tts_model.py570 except Exception as e:CODE
LOWpocket_tts/models/tts_model.py852 except Exception as e:CODE
MEDIUMpocket_tts/models/tts_model.py847def run_generation():CODE
LOWtraining/scripts/prepare_data.py278 except Exception as exc: # noqa: BLE001 -- dead LibriVox links happenCODE
LOWtraining/scripts/align_data.py269 except Exception as exc: # noqa: BLE001CODE
LOWtraining/dataloader/loader.py324 except Exception as exc: # noqa: BLE001 — skip unreadable samples, whatever the causeCODE
MEDIUMtraining/dataloader/loader.py36def worker():CODE
LOWscripts/evaluate_quantization.py204 except Exception as e:CODE
LOWscripts/evaluate_quantization.py273 except Exception as e:CODE
AI Structural Patterns9 hits · 9 pts
SeverityFileLineSnippetContext
LOWpocket_tts/main.py264CODE
LOWpocket_tts/models/tts_model.py285CODE
LOWpocket_tts/models/mimi.py100CODE
LOWpocket_tts/models/flow_lm.py232CODE
LOWpocket_tts/modules/seanet.py50CODE
LOWpocket_tts/modules/seanet.py122CODE
LOWtraining/scripts/prepare_data.py345CODE
LOWtraining/modules/samplers.py77CODE
LOWtraining/dataloader/subproc.py51CODE
Over-Commented Block6 hits · 6 pts
SeverityFileLineSnippetContext
LOWpocket_tts/__init__.py1from pocket_tts.models.model_state import export_model_stateCOMMENT
LOWpocket_tts/utils/config.py121 weights_path_without_voice_cloning: str | None = NoneCOMMENT
LOWtraining/args.py21 # boundaries ending inside the first max_voice_prompt_sec seconds, drawnCOMMENT
LOWtraining/args.py61 max_norm: float = 1.0COMMENT
LOWtraining/args.py161 # (built from `model_config`, typically fewer layers) learns to reproduce itsCOMMENT
LOWscripts/generate_default_voices.py21 model_state_copy = model.get_state_for_audio_prompt(dest)COMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWpocket_tts/main.py189 # Close the file before reading it back (required on Windows)COMMENT