A TTS that fits in your CPU (and pocket)
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.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 169 finding(s).
Are imports declared and package/API names verified? 13 finding(s).
Are wrappers, guards, and repeated structures necessary? 193 finding(s).
Which changes need focused human review? 233 finding(s).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/quantization.py | 58 | def _ensure_quantization_engine(): | CODE |
| LOW | pocket_tts/default_parameters.py | 65 | def get_default_text_for_language(language: str | None) -> str: | CODE |
| LOW | pocket_tts/default_parameters.py | 72 | 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 | 61 | def _ensure_terminal_punctuation(text: str) -> str: | CODE |
| LOW | pocket_tts/models/text_chunking.py | 82 | def _is_decimal_period_boundary( | CODE |
| LOW | pocket_tts/models/text_chunking.py | 130 | def _segments_from_boundaries( | CODE |
| LOW | pocket_tts/models/text_chunking.py | 143 | def split_into_best_sentences( | CODE |
| LOW | pocket_tts/models/tts_model.py | 210 | def _from_pydantic_config_with_weights( | CODE |
| LOW | pocket_tts/models/tts_model.py | 390 | def _run_flow_lm_and_increment_step( | CODE |
| LOW | pocket_tts/models/tts_model.py | 749 | def _generate_audio_stream_short_text( | CODE |
| LOW | pocket_tts/models/tts_model.py | 866 | def _autoregressive_generation( | CODE |
| LOW | pocket_tts/models/tts_model.py | 916 | def _cached_get_state_for_audio_prompt( | CODE |
| LOW | pocket_tts/models/tts_model.py | 922 | def get_state_for_audio_prompt( | CODE |
| LOW | pocket_tts/data/audio.py | 45 | def _audio_read_with_soundfile(filepath: Path) -> tuple[torch.Tensor, int]: | CODE |
| LOW | training/checkpointing.py | 132 | def export_pocket_safetensors( | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 56 | def test_rank_sharding_partitions_entries_without_overlap(tmp_path: Path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 63 | def test_prompt_respects_the_configured_cap(tmp_path: Path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 68 | def test_batches_have_the_requested_size(tmp_path: Path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 74 | def test_target_audio_never_exceeds_max_duration(tmp_path: Path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 79 | def test_unaligned_manifest_is_refused(tmp_path: Path): | CODE |
| LOW⚡ | training/tests/test_dataloader.py | 87 | def test_entry_start_offsets_into_a_shared_file(tmp_path: Path): | CODE |
| LOW | training/tests/test_dataloader.py | 137 | def test_shard_smaller_than_the_bucket_pool_names_the_knobs(tmp_path: Path): | CODE |
| LOW | training/tests/test_dataloader.py | 143 | def test_startup_check_rejects_manifests_too_small_for_the_loaders(tmp_path: Path): | CODE |
| LOW | training/tests/test_smoke.py | 141 | def test_head_supports_every_time_cond_count(num_time_conds: int): | CODE |
| LOW | training/tests/test_smoke.py | 153 | def test_head_keeps_released_state_dict_layout(): | CODE |
| LOW | training/tests/test_smoke.py | 179 | def test_generate_ragged_matches_batch_of_one(): | CODE |
| LOW | training/tests/test_smoke.py | 205 | def test_generate_per_row_eos(): | CODE |
| LOW | training/tests/test_smoke.py | 218 | def test_padded_batch_matches_unpadded_under_context_window(): | CODE |
| LOW | training/tests/test_smoke.py | 250 | def test_ema_load_drops_untracked_keys(): | CODE |
| LOW | training/tests/test_smoke.py | 334 | def test_grad_accum_matches_big_batch(): | CODE |
| LOW | training/tests/test_smoke.py | 359 | def test_train_tokenizer_matches_the_released_spec(tmp_path: Path): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 31 | def test_scratch_reaches_the_effective_batch_floor(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 39 | def test_scratch_runs_past_the_quality_transition(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 43 | def test_scratch_builds_the_reference_teacher_depth(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 49 | def test_distill_teacher_is_deeper_than_its_student(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 58 | def test_distill_teacher_weights_point_at_the_scratch_run(): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 70 | def test_num_ckpt_keep_zero_is_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 74 | def test_zero_frequencies_are_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 80 | def test_distillation_without_a_teacher_is_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 84 | def test_teacher_config_without_weights_is_rejected(self): | CODE |
| LOW⚡ | training/tests/test_config_invariants.py | 88 | def test_unknown_keys_are_rejected(self): | CODE |
| LOW | training/tests/test_loader_signals.py | 17 | def test_loader_processes_survive_stop_signals() -> None: | CODE |
| LOW⚡ | training/tests/test_units.py | 22 | def test_warmup_ends_at_the_configured_lr(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 28 | def test_cosine_decays_to_the_floor_at_max_steps(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 34 | def test_cosine_respects_lr_min_ratio(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 47 | def test_keeps_the_ends_of_the_stack(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 50 | def test_identity_when_depths_match(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 53 | def test_rejects_growing_the_stack(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 57 | def test_shrink_renumbers_kept_layers_contiguously(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 78 | def test_tracks_only_trainable_parameters(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 84 | def test_update_moves_towards_the_live_weights(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 92 | def test_loading_a_partial_shadow_keeps_untracked_weights(self): | CODE |
| LOW | training/tests/test_units.py | 106 | def test_skip_rate_matches_probability(self): | CODE |
| LOW | training/tests/test_units.py | 113 | def test_ranks_agree_on_every_draw(self): | CODE |
| LOW | training/tests/test_units.py | 128 | def test_eval_mode_always_computes_the_full_loss(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 142 | def test_learned_temperature_gets_a_gradient(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 148 | def test_fixed_temperature_keeps_the_resumed_value(self): | CODE |
| LOW⚡ | training/tests/test_units.py | 157 | def test_decode_is_the_head_output(self): | CODE |
| LOW | training/tests/test_eval_naming.py | 19 | def test_default_name_is_bare(): | CODE |
| 73 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | pocket_tts/main.py | 41 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | pocket_tts/main.py | 43 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 258 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 260 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 389 | # ---------------------------------------------- | COMMENT |
| MEDIUM | pocket_tts/main.py | 391 | # ---------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 219 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 221 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 368 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 370 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 405 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 407 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 527 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/evaluate_quantization.py | 529 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | training/dataloader/encode.py | 0 | data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., " | STRING |
| HIGH | training/dataloader/subproc.py | 0 | data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., " | STRING |
| HIGH | training/dataloader/types.py | 0 | data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., " | STRING |
| HIGH | training/dataloader/loader.py | 0 | data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., " | STRING |
| HIGH | training/dataloader/audio.py | 0 | data loading: jsonl manifests of single utterances (moshi-finetune style). each line is {"path": ..., "duration": ..., " | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pocket_tts/models/tts_model.py | 297 | 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 | 583 | 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 | 652 | 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 | 925 | 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 | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/__init__.py | 12 | __all__ = ["TTSModel", "export_model_state"] | CODE |
| LOW⚡ | pocket_tts/main.py | 34 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/models/text_chunking.py | 12 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/models/tts_model.py | 58 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/models/flow_lm.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/modules/text_conditioner.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/data/audio.py | 19 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/checkpointing.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/modules/builders.py | 28 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/dataloader/encode.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/dataloader/manifest.py | 9 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/dataloader/subproc.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/dataloader/__init__.py | 10 | __all__ = [ | CODE |
| LOW | training/dataloader/types.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/dataloader/loader.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | training/dataloader/audio.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | scripts/evaluate_quantization.py | 65 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/models/text_chunking.py | 97 | CODE | |
| LOW | pocket_tts/models/tts_model.py | 167 | CODE | |
| LOW | pocket_tts/models/tts_model.py | 503 | CODE | |
| LOW | pocket_tts/models/tts_model.py | 749 | CODE | |
| LOW | training/train.py | 166 | CODE | |
| LOW | training/args.py | 200 | 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/convert_tokenizer.py | 45 | CODE | |
| LOW | training/scripts/align_data.py | 205 | CODE | |
| LOW | training/scripts/train_tokenizer.py | 39 | CODE | |
| LOW | training/eval/release_checks.py | 243 | CODE | |
| LOW | training/eval/librispeech.py | 102 | CODE | |
| LOW | training/eval/librispeech.py | 268 | CODE | |
| LOW | scripts/evaluate_quantization.py | 532 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pocket_tts/quantization.py | 43 | except ImportError: | CODE |
| HIGH | training/scripts/align_data.py | 197 | except FileNotFoundError: | CODE |
| HIGH | training/eval/librispeech.py | 312 | except ImportError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/__init__.py | 1 | CODE | |
| LOW | pocket_tts/__init__.py | 2 | CODE | |
| LOW | training/args.py | 10 | CODE | |
| LOW | training/dataloader/subproc.py | 10 | CODE | |
| LOW | training/dataloader/__init__.py | 3 | CODE | |
| LOW | training/dataloader/__init__.py | 4 | CODE | |
| LOW | training/dataloader/__init__.py | 5 | CODE | |
| LOW | training/dataloader/__init__.py | 5 | CODE | |
| LOW | training/dataloader/__init__.py | 6 | CODE | |
| LOW | training/dataloader/__init__.py | 6 | CODE | |
| LOW | training/dataloader/__init__.py | 7 | CODE | |
| LOW | training/dataloader/__init__.py | 8 | CODE | |
| LOW | training/dataloader/__init__.py | 8 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/models/tts_model.py | 196 | except Exception: | CODE |
| LOW | pocket_tts/models/tts_model.py | 261 | except Exception: | CODE |
| LOW | pocket_tts/models/tts_model.py | 570 | except Exception as e: | CODE |
| LOW | pocket_tts/models/tts_model.py | 852 | except Exception as e: | CODE |
| MEDIUM | pocket_tts/models/tts_model.py | 847 | def run_generation(): | 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 | 269 | except Exception as exc: # noqa: BLE001 | CODE |
| LOW | training/dataloader/loader.py | 324 | except Exception as exc: # noqa: BLE001 — skip unreadable samples, whatever the cause | CODE |
| MEDIUM | training/dataloader/loader.py | 36 | def worker(): | CODE |
| LOW | scripts/evaluate_quantization.py | 204 | except Exception as e: | CODE |
| LOW | scripts/evaluate_quantization.py | 273 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/main.py | 264 | CODE | |
| LOW | pocket_tts/models/tts_model.py | 285 | CODE | |
| LOW | pocket_tts/models/mimi.py | 100 | CODE | |
| LOW | pocket_tts/models/flow_lm.py | 232 | CODE | |
| LOW | pocket_tts/modules/seanet.py | 50 | CODE | |
| LOW | pocket_tts/modules/seanet.py | 122 | CODE | |
| LOW | training/scripts/prepare_data.py | 345 | CODE | |
| LOW | training/modules/samplers.py | 77 | CODE | |
| LOW | training/dataloader/subproc.py | 51 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/__init__.py | 1 | from pocket_tts.models.model_state import export_model_state | COMMENT |
| LOW | pocket_tts/utils/config.py | 121 | weights_path_without_voice_cloning: str | None = None | COMMENT |
| LOW | training/args.py | 21 | # boundaries ending inside the first max_voice_prompt_sec seconds, drawn | COMMENT |
| LOW | training/args.py | 61 | max_norm: float = 1.0 | COMMENT |
| LOW | training/args.py | 161 | # (built from `model_config`, typically fewer layers) learns to reproduce its | 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/main.py | 189 | # Close the file before reading it back (required on Windows) | COMMENT |