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 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).
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.
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 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | pocket_tts/main.py | 39 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | pocket_tts/main.py | 41 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 217 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 219 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | pocket_tts/main.py | 330 | # ---------------------------------------------- | COMMENT |
| MEDIUM | pocket_tts/main.py | 332 | # ---------------------------------------------- | 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 |
|---|---|---|---|---|
| LOW | pocket_tts/quantization.py | 52 | def _ensure_quantization_engine(): | CODE |
| LOW | pocket_tts/default_parameters.py | 53 | def get_default_text_for_language(language: str | None) -> str: | CODE |
| LOW | pocket_tts/default_parameters.py | 60 | def get_default_voice_for_language(language: str | None) -> str: | CODE |
| LOW | pocket_tts/models/tts_model.py | 130 | def _from_pydantic_config_with_weights( | CODE |
| LOW | pocket_tts/models/tts_model.py | 317 | def _run_flow_lm_and_increment_step( | CODE |
| LOW | pocket_tts/models/tts_model.py | 634 | def _generate_audio_stream_short_text( | CODE |
| LOW | pocket_tts/models/tts_model.py | 745 | def _autoregressive_generation( | CODE |
| LOW | pocket_tts/models/tts_model.py | 782 | def _cached_get_state_for_audio_prompt( | CODE |
| LOW | pocket_tts/models/tts_model.py | 788 | def get_state_for_audio_prompt( | CODE |
| LOW | pocket_tts/models/tts_model.py | 965 | def _segments_from_boundaries( | CODE |
| LOW | pocket_tts/models/tts_model.py | 978 | def split_into_best_sentences( | CODE |
| LOW | tests/test_cli_generate.py | 19 | def test_generate_basic_usage(tmp_path): | CODE |
| LOW | tests/test_cli_generate.py | 41 | def test_generate_with_custom_voice(tmp_path): | CODE |
| LOW | tests/test_cli_generate.py | 68 | def test_generate_with_custom_parameters(tmp_path): | CODE |
| LOW | tests/test_cli_generate.py | 102 | def test_generate_verbose_mode(tmp_path): | CODE |
| LOW | tests/test_cli_generate.py | 115 | def test_generate_default_text(tmp_path): | CODE |
| LOW | tests/test_cli_generate.py | 150 | def test_generate_multiple_runs(tmp_path): | CODE |
| LOW | tests/test_documentation_examples.py | 74 | def test_get_state_for_audio_prompt(): | CODE |
| LOW | tests/test_documentation_examples.py | 110 | def test_generate_audio_stream(): | CODE |
| LOW | tests/test_split_sentences.py | 14 | def test_short_text_single_chunk(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 26 | def test_multiple_sentences_split(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 35 | def test_long_sentence_with_commas_is_split(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 56 | def test_long_sentence_with_commas_respects_max_tokens(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 75 | def test_mixed_sentences_and_commas(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 90 | def test_no_commas_no_periods_stays_single_chunk(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 100 | def test_semicolons_and_colons_also_split(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 112 | def test_short_sentence_not_affected_by_comma_splitting(tokenizer): | CODE |
| LOW | tests/test_split_sentences.py | 131 | def test_oversized_clause_without_commas_still_returns(tokenizer): | CODE |
| LOW⚡ | tests/test_python_api.py | 8 | def test_public_api_exports_only_tts_model(): | CODE |
| LOW⚡ | tests/test_python_api.py | 12 | def test_public_api_tts_model_points_to_implementation(): | CODE |
| LOW⚡ | tests/test_python_api.py | 16 | def test_public_api_expected_methods_and_properties(): | CODE |
| LOW | tests/test_quantization.py | 24 | def test_quantized_model_produces_audio(): | CODE |
| LOW | tests/test_quantization.py | 35 | def test_quantize_flag_applies_quantization(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pocket_tts/models/tts_model.py | 243 | 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 | 485 | 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 | 553 | 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 | 791 | 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 | 19 | __all__ = ["TTSModel", "export_model_state"] | CODE |
| LOW⚡ | pocket_tts/main.py | 32 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/models/tts_model.py | 50 | 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/conditioners/base.py | 7 | logger = logging.getLogger(__name__) | CODE |
| LOW | pocket_tts/data/audio.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | scripts/evaluate_quantization.py | 58 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/models/tts_model.py | 205 | except Exception: | CODE |
| LOW | pocket_tts/models/tts_model.py | 472 | except Exception as e: | CODE |
| LOW | pocket_tts/models/tts_model.py | 732 | except Exception as e: | CODE |
| MEDIUM | pocket_tts/models/tts_model.py | 727 | def run_generation(): | 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 | 223 | CODE | |
| LOW | pocket_tts/models/mimi.py | 94 | CODE | |
| LOW | pocket_tts/models/flow_lm.py | 190 | CODE | |
| LOW | pocket_tts/modules/seanet.py | 45 | CODE | |
| LOW | pocket_tts/modules/seanet.py | 117 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/__init__.py | 6 | CODE | |
| LOW | pocket_tts/__init__.py | 6 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/models/tts_model.py | 634 | CODE | |
| LOW | scripts/evaluate_quantization.py | 516 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pocket_tts/main.py | 166 | # Close the file before reading it back (required on Windows) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/generate_default_voices.py | 21 | model_state_copy = model.get_state_for_audio_prompt(dest) | COMMENT |