A TTS that fits in your CPU (and pocket)
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/quantization.py | 52 | def _ensure_quantization_engine(): | CODE |
| LOW | pocket_tts/default_parameters.py | 59 | def get_default_text_for_language(language: str | None) -> str: | CODE |
| LOW | pocket_tts/default_parameters.py | 66 | def get_default_voice_for_language( | CODE |
| LOW | pocket_tts/utils/weights_loading.py | 82 | def get_training_checkpoint_state_dicts( | CODE |
| LOW | pocket_tts/models/text_chunking.py | 44 | def _is_decimal_period_boundary( | CODE |
| LOW | pocket_tts/models/text_chunking.py | 92 | def _segments_from_boundaries( | CODE |
| LOW | pocket_tts/models/text_chunking.py | 105 | def split_into_best_sentences( | CODE |
| LOW | pocket_tts/models/tts_model.py | 183 | def _from_pydantic_config_with_weights( | CODE |
| LOW | pocket_tts/models/tts_model.py | 365 | def _run_flow_lm_and_increment_step( | CODE |
| LOW | pocket_tts/models/tts_model.py | 676 | def _generate_audio_stream_short_text( | CODE |
| LOW | pocket_tts/models/tts_model.py | 788 | def _autoregressive_generation( | CODE |
| LOW | pocket_tts/models/tts_model.py | 825 | def _cached_get_state_for_audio_prompt( | CODE |
| LOW | pocket_tts/models/tts_model.py | 831 | def get_state_for_audio_prompt( | CODE |
| LOW | pocket_tts/data/audio.py | 44 | def _audio_read_with_soundfile(filepath: Path) -> tuple[torch.Tensor, int]: | CODE |
| LOW | training/checkpointing.py | 125 | def export_pocket_safetensors( | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 52 | def test_rank_sharding_partitions_entries_without_overlap(tmp_path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 59 | def test_prompt_respects_the_configured_cap(tmp_path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 64 | def test_batches_have_the_requested_size(tmp_path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 70 | def test_target_audio_never_exceeds_max_duration(tmp_path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 75 | def test_unaligned_manifest_still_yields_batches(tmp_path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 83 | def test_entry_start_offsets_into_a_shared_file(tmp_path): | CODE |
| LOW | training/tests/test_smoke.py | 137 | def test_head_supports_every_time_cond_count(num_time_conds): | CODE |
| LOW | training/tests/test_smoke.py | 149 | def test_head_keeps_released_state_dict_layout(): | CODE |
| LOW | training/tests/test_smoke.py | 175 | def test_generate_ragged_matches_batch_of_one(): | CODE |
| LOW | training/tests/test_smoke.py | 201 | def test_generate_per_row_eos(): | CODE |
| LOW | training/tests/test_smoke.py | 214 | def test_padded_batch_matches_unpadded_under_context_window(): | CODE |
| LOW | training/tests/test_smoke.py | 246 | def test_ema_load_drops_untracked_keys(): | CODE |
| LOW | training/tests/test_smoke.py | 328 | def test_grad_accum_matches_big_batch(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 30 | def test_scratch_reaches_the_effective_batch_floor(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 38 | def test_scratch_runs_past_the_quality_transition(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 42 | def test_scratch_builds_the_reference_teacher_depth(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 48 | def test_distill_teacher_is_deeper_than_its_student(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 57 | def test_distill_teacher_weights_point_at_the_scratch_run(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 69 | def test_num_ckpt_keep_zero_is_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 73 | def test_zero_frequencies_are_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 78 | def test_distillation_without_a_teacher_is_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 82 | def test_teacher_config_without_weights_is_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 86 | def test_unknown_keys_are_rejected(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 20 | def test_warmup_ends_at_the_configured_lr(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 26 | def test_cosine_decays_to_the_floor_at_max_steps(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 32 | def test_cosine_respects_lr_min_ratio(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 45 | def test_keeps_the_ends_of_the_stack(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 48 | def test_identity_when_depths_match(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 51 | def test_rejects_growing_the_stack(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 55 | def test_shrink_renumbers_kept_layers_contiguously(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 76 | def test_tracks_only_trainable_parameters(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 82 | def test_update_moves_towards_the_live_weights(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 90 | def test_loading_a_partial_shadow_keeps_untracked_weights(self): | CODE |
| LOW | training/tests/test_units.py | 104 | def test_skip_rate_matches_probability(self): | CODE |
| LOW | training/tests/test_units.py | 111 | def test_ranks_agree_on_every_draw(self): | CODE |
| LOW | training/tests/test_units.py | 126 | def test_eval_mode_always_computes_the_full_loss(self): | CODE |
| LOW | training/tests/test_eval_naming.py | 19 | def test_default_name_is_bare(): | CODE |
| LOW⚡ | training/tests/test_eval_naming.py | 33 | def test_each_knob_marks_the_name(over, fragment): | CODE |
| LOW⚡ | training/tests/test_eval_naming.py | 37 | def test_seeds_do_not_collide(): | CODE |
| LOW⚡ | training/tests/test_eval_naming.py | 43 | def test_every_pair_of_settings_is_distinguishable(): | CODE |
| LOW⚡ | training/tests/test_eval_naming.py | 57 | def test_step_prefixes_do_not_collide_under_globbing(): | CODE |
| LOW⚡ | training/tests/test_eval_naming.py | 64 | def test_hf_prompt_root_tags_by_repo_name_not_snapshot_path(): | CODE |
| LOW⚡ | training/tests/test_eval_naming.py | 73 | def test_local_prompt_root_keeps_directory_tag(): | CODE |
| LOW | training/tests/test_prepare_data.py | 19 | def test_utterances_in_one_chapter_share_the_manifest_path(tmp_path, monkeypatch): | CODE |
| LOW | training/tests/test_prepare_data.py | 94 | def test_hf_alignments_join_on_utterance_id_not_path(tmp_path, monkeypatch): | CODE |
| 34 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | pocket_tts/main.py | 39 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | pocket_tts/main.py | 41 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 220 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 222 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 350 | # ---------------------------------------------- | COMMENT |
| MEDIUM | pocket_tts/main.py | 352 | # ---------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 210 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 212 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 352 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 354 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 389 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 391 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 511 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 513 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pocket_tts/models/tts_model.py | 268 | Load a pre-trained TTS model with specified configuration. This class method loads a complete TTS model includi | STRING |
| HIGH | pocket_tts/models/tts_model.py | 527 | Generate complete audio tensor from text input. This method generates the full audio output for the given text | STRING |
| HIGH | pocket_tts/models/tts_model.py | 595 | Generate audio streaming chunks from text input. This method generates audio from text and yields chunks as the | STRING |
| HIGH | pocket_tts/models/tts_model.py | 834 | Create model state conditioned on audio prompt for continuation. This method processes an audio prompt and crea | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/quantization.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/__init__.py | 29 | __all__ = ["TTSModel", "export_model_state"] | CODE |
| LOW⚡ | pocket_tts/main.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/models/text_chunking.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/models/tts_model.py | 52 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/models/flow_lm.py | 14 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/conditioners/text.py | 10 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/data/audio.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/dataloader.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/checkpointing.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/modules/builders.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/modules/model.py | 41 | def _update_latent_stats(self, latents: torch.Tensor, mask: torch.Tensor) -> None: | CODE |
| LOW | training/modules/utils.py | 52 | def set_state_padding(model_state: dict, pad: torch.Tensor) -> None: | CODE |
| LOW | scripts/evaluate_quantization.py | 58 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/models/text_chunking.py | 59 | CODE | |
| LOW | pocket_tts/models/tts_model.py | 676 | CODE | |
| LOW | training/train.py | 161 | CODE | |
| LOW | training/args.py | 159 | CODE | |
| LOW | training/scripts/prepare_data.py | 56 | CODE | |
| LOW | training/scripts/prepare_data.py | 132 | CODE | |
| LOW | training/scripts/prepare_data.py | 175 | CODE | |
| LOW | training/scripts/align_data.py | 194 | CODE | |
| LOW | training/scripts/train_tokenizer.py | 30 | CODE | |
| LOW | training/eval/librispeech.py | 92 | CODE | |
| LOW | training/eval/librispeech.py | 226 | CODE | |
| LOW | scripts/evaluate_quantization.py | 516 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/models/tts_model.py | 171 | except Exception: | CODE |
| LOW | pocket_tts/models/tts_model.py | 234 | except Exception: | CODE |
| LOW | pocket_tts/models/tts_model.py | 514 | except Exception as e: | CODE |
| LOW | pocket_tts/models/tts_model.py | 774 | except Exception as e: | CODE |
| MEDIUM | pocket_tts/models/tts_model.py | 769 | def run_generation(): | CODE |
| LOW | training/dataloader.py | 200 | except Exception as exc: # noqa: BLE001 — skip unreadable samples, whatever the cause | CODE |
| LOW | training/scripts/prepare_data.py | 278 | except Exception as exc: # noqa: BLE001 -- dead LibriVox links happen | CODE |
| LOW | training/scripts/align_data.py | 258 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | scripts/evaluate_quantization.py | 195 | except Exception as e: | CODE |
| LOW | scripts/evaluate_quantization.py | 264 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/main.py | 226 | CODE | |
| LOW | pocket_tts/models/tts_model.py | 256 | CODE | |
| LOW | pocket_tts/models/mimi.py | 97 | CODE | |
| LOW | pocket_tts/models/flow_lm.py | 206 | CODE | |
| LOW | pocket_tts/modules/seanet.py | 47 | CODE | |
| LOW | pocket_tts/modules/seanet.py | 119 | CODE | |
| LOW | training/scripts/prepare_data.py | 344 | CODE | |
| LOW | training/modules/samplers.py | 70 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/__init__.py | 21 | # Public methods: | COMMENT |
| LOW | scripts/generate_default_voices.py | 21 | model_state_copy = model.get_state_for_audio_prompt(dest) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/__init__.py | 16 | CODE | |
| LOW | pocket_tts/__init__.py | 17 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/main.py | 168 | # Close the file before reading it back (required on Windows) | COMMENT |