Repository Analysis

resemble-ai/chatterbox

SoTA open-source TTS

20.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of resemble-ai/chatterbox, a Python project with 25,511 GitHub stars. SynthScan v2.0 examined 9,727 lines of code across 61 source files, recording 119 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 20.4 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).

20.4
Adjusted Score
20.4
Raw Score
100%
Time Factor
2026-06-10
Last Push
25.5K
Stars
Python
Language
9.7K
Lines of Code
61
Files
119
Pattern Hits
2026-07-14
Scan Date
0.25
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 15MEDIUM 14LOW 90

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 119 distinct pattern matches across 14 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.

Docstring Block Structure6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHsrc/chatterbox/models/s3gen/decoder.py244Forward pass of the UNet1DConditional model. Args: x: (B, 80, T) mask (_type_) STRING
HIGHsrc/chatterbox/models/s3gen/xvector.py16Perform padding for the list of tensors. Args: xs (List): List of Tensors [(T_1, `*`), (T_2, `*`), ..., (T_STRING
HIGHsrc/chatterbox/models/s3gen/utils/mask.py19 def subsequent_mask( size: int, device: torch.device = torch.device("cpu"), ) -> torch.Tensor: """CSTRING
HIGHsrc/chatterbox/models/s3gen/utils/mask.py60Create mask for subsequent steps (size, size) with chunk size, this is for streaming encoder Args: sSTRING
HIGHsrc/chatterbox/models/s3gen/utils/mask.py168Make mask tensor containing indices of padded part. See description of make_non_pad_mask. Args: lengthSTRING
HIGHsrc/chatterbox/models/s3gen/matcha/decoder.py364Forward pass of the UNet1DConditional model. Args: x (torch.Tensor): shape (batch_size, in_channelsSTRING
Cross-File Repetition6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHsrc/chatterbox/tts.py0quick cleanup func for punctuation from llms or containing chars not seen often in the datasetSTRING
HIGHsrc/chatterbox/tts_turbo.py0quick cleanup func for punctuation from llms or containing chars not seen often in the datasetSTRING
HIGHsrc/chatterbox/mtl_tts.py0quick cleanup func for punctuation from llms or containing chars not seen often in the datasetSTRING
HIGHsrc/chatterbox/tts.py0conditionals for t3 and s3gen - t3 conditionals: - speaker_emb - clap_emb - cond_prompt_speech_tokens - cond_prompt_speeSTRING
HIGHsrc/chatterbox/tts_turbo.py0conditionals for t3 and s3gen - t3 conditionals: - speaker_emb - clap_emb - cond_prompt_speech_tokens - cond_prompt_speeSTRING
HIGHsrc/chatterbox/mtl_tts.py0conditionals for t3 and s3gen - t3 conditionals: - speaker_emb - clap_emb - cond_prompt_speech_tokens - cond_prompt_speeSTRING
Unused Imports24 hits · 24 pts
SeverityFileLineSnippetContext
LOWexample_tts_turbo.py2CODE
LOWsrc/chatterbox/__init__.py9CODE
LOWsrc/chatterbox/__init__.py10CODE
LOWsrc/chatterbox/__init__.py11CODE
LOWsrc/chatterbox/__init__.py11CODE
LOWsrc/chatterbox/models/tokenizers/__init__.py1CODE
LOWsrc/chatterbox/models/tokenizers/__init__.py1CODE
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1CODE
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1CODE
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1CODE
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1CODE
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1CODE
LOWsrc/chatterbox/models/t3/__init__.py1CODE
LOWsrc/chatterbox/models/t3/t3.py4CODE
LOWsrc/chatterbox/models/t3/t3.py4CODE
LOWsrc/chatterbox/models/t3/inference/t3_hf_backend.py4CODE
LOWsrc/chatterbox/models/t3/modules/learned_pos_emb.py1CODE
LOWsrc/chatterbox/models/t3/modules/learned_pos_emb.py4CODE
LOWsrc/chatterbox/models/voice_encoder/__init__.py1CODE
LOWsrc/chatterbox/models/voice_encoder/__init__.py1CODE
LOWsrc/chatterbox/models/s3gen/__init__.py1CODE
LOWsrc/chatterbox/models/s3gen/__init__.py2CODE
LOWsrc/chatterbox/models/s3gen/flow.py23CODE
LOWsrc/chatterbox/models/s3gen/flow_matching.py14CODE
Over-Commented Block19 hits · 19 pts
SeverityFileLineSnippetContext
LOWsrc/chatterbox/models/t3/t3.py281 speech_head=self.speech_head,COMMENT
LOWsrc/chatterbox/models/s3gen/decoder.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Zhihao Du)COMMENT
LOWsrc/chatterbox/models/s3gen/flow.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Zhihao Du)COMMENT
LOWsrc/chatterbox/models/s3gen/hifigan.py1# jrm: adapted from CosyVoice/cosyvoice/hifigan/generator.pyCOMMENT
LOWsrc/chatterbox/models/s3gen/f0_predictor.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Kai Hu)COMMENT
LOWsrc/chatterbox/models/s3gen/s3gen.py1# Modified from CosyVoice https://github.com/FunAudioLLM/CosyVoiceCOMMENT
LOWsrc/chatterbox/models/s3gen/flow_matching.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Zhihao Du)COMMENT
LOWsrc/chatterbox/models/s3gen/transformer/attention.py1# Copyright (c) 2019 Shigeki KaritaCOMMENT
LOWsrc/chatterbox/models/s3gen/transformer/attention.py161 Returns:COMMENT
LOWsrc/chatterbox/models/s3gen/transformer/attention.py281 # cache(1, head, 0, d_k * 2) (16/-1, -1/-1, 16/0 mode)COMMENT
LOWsrc/chatterbox/models/s3gen/transformer/subsampling.py1# Copyright (c) 2021 Mobvoi Inc (Binbin Zhang, Di Wu)COMMENT
LOWsrc/chatterbox/models/s3gen/transformer/convolution.py1# Copyright (c) 2020 Mobvoi Inc. (authors: Binbin Zhang, Di Wu)COMMENT
LOW…hatterbox/models/s3gen/transformer/upsample_encoder.py1# Copyright (c) 2021 Mobvoi Inc (Binbin Zhang, Di Wu)COMMENT
LOWsrc/chatterbox/models/s3gen/transformer/embedding.py1# Copyright (c) 2020 Mobvoi Inc. (authors: Binbin Zhang, Di Wu)COMMENT
LOW…c/chatterbox/models/s3gen/transformer/encoder_layer.py1# Copyright (c) 2021 Mobvoi Inc (Binbin Zhang, Di Wu)COMMENT
LOWsrc/chatterbox/models/s3gen/transformer/activation.py1# Copyright (c) 2020 Johns Hopkins University (Shinji Watanabe)COMMENT
LOW…/models/s3gen/transformer/positionwise_feed_forward.py1# Copyright (c) 2019 Shigeki KaritaCOMMENT
LOWsrc/chatterbox/models/s3gen/utils/class_utils.py1# Copyright [2023-11-28] <sxc19@mails.tsinghua.edu.cn, Xingchen Song>COMMENT
LOWsrc/chatterbox/models/s3gen/utils/mask.py1# Copyright (c) 2019 Shigeki KaritaCOMMENT
Dead Code9 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py63CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py64CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py66CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py69CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py70CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py71CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py73CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py74CODE
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py76CODE
AI Structural Patterns16 hits · 16 pts
SeverityFileLineSnippetContext
LOWsrc/chatterbox/tts_turbo.py248CODE
LOWsrc/chatterbox/models/t3/t3.py226CODE
LOWsrc/chatterbox/models/s3gen/decoder.py100CODE
LOWsrc/chatterbox/models/s3gen/flow.py44CODE
LOWsrc/chatterbox/models/s3gen/hifigan.py291CODE
LOWsrc/chatterbox/models/s3gen/xvector.py91CODE
LOWsrc/chatterbox/models/s3gen/xvector.py127CODE
LOWsrc/chatterbox/models/s3gen/xvector.py341CODE
LOW…hatterbox/models/s3gen/transformer/upsample_encoder.py101CODE
LOWsrc/chatterbox/models/s3gen/utils/mask.py86CODE
LOWsrc/chatterbox/models/s3gen/utils/mel.py21CODE
LOWsrc/chatterbox/models/s3gen/utils/mel.py36CODE
LOWsrc/chatterbox/models/s3gen/matcha/decoder.py61CODE
LOWsrc/chatterbox/models/s3gen/matcha/decoder.py162CODE
LOWsrc/chatterbox/models/s3gen/matcha/decoder.py201CODE
LOWsrc/chatterbox/models/s3gen/matcha/transformer.py159CODE
Cross-Language Confusion3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHgradio_tts_turbo_app.py62 if (end < current_text.length && current_text[end] === ' ') suffix = "";CODE
HIGHgradio_tts_app.py61 min_p = gr.Slider(0.00, 1.00, step=0.01, label="min_p || Newer Sampler. Recommend 0.02 > 0.1. Handles HiCODE
HIGHgradio_tts_app.py62 top_p = gr.Slider(0.00, 1.00, step=0.01, label="top_p || Original Sampler. 1.0 Disables(recommended). OrCODE
Excessive Try-Catch Wrapping8 hits · 12 pts
SeverityFileLineSnippetContext
LOWmultilingual_app.py150 except Exception as e:CODE
MEDIUMmultilingual_app.py151 print(f"Error loading model: {e}")CODE
LOWmultilingual_app.py158except Exception as e:CODE
LOWsrc/chatterbox/tts_turbo.py212 except Exception as e:CODE
MEDIUMsrc/chatterbox/tts_turbo.py204def norm_loudness(self, wav, sr, target_lufs=-27):CODE
LOWsrc/chatterbox/models/tokenizers/tokenizer.py131 except Exception as e:CODE
LOWsrc/chatterbox/models/tokenizers/tokenizer.py187 except Exception as e:CODE
LOWsrc/chatterbox/models/tokenizers/tokenizer.py251 except Exception as e:CODE
Modern AI Meta-Vocabulary3 hits · 7 pts
SeverityFileLineSnippetContext
MEDIUMREADME.md43| **Chatterbox-Multilingual V3** [(Language list)](#supported-languages) | **50CODE
MEDIUMREADME.md45| Chatterbox [(Tips and Tricks)](#original-chatterbox-tips) | 500MCODE
MEDIUMsrc/chatterbox/models/s3gen/s3gen.py343 # hallucination prevention, drop special tokensCOMMENT
Modern Structural Boilerplate7 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/chatterbox/tts_turbo.py24logger = logging.getLogger(__name__)CODE
LOWsrc/chatterbox/models/tokenizers/tokenizer.py18logger = logging.getLogger(__name__)CODE
LOWsrc/chatterbox/models/t3/t3.py6logger = logging.getLogger(__name__)CODE
LOWsrc/chatterbox/models/t3/t3.py30logger = logging.getLogger(__name__)CODE
LOWsrc/chatterbox/models/s3gen/flow.py18logger = logging.getLogger(__name__)CODE
LOWsrc/chatterbox/models/s3gen/flow.py27logger = logging.getLogger(__name__)CODE
LOWsrc/chatterbox/models/s3gen/utils/mel.py7logger = logging.getLogger(__name__)CODE
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippetContext
LOWsrc/chatterbox/models/tokenizers/tokenizer.py75CODE
LOWsrc/chatterbox/models/tokenizers/tokenizer.py285CODE
LOWsrc/chatterbox/models/s3gen/decoder.py229CODE
LOWsrc/chatterbox/models/s3gen/xvector.py130CODE
LOWsrc/chatterbox/models/s3gen/utils/mask.py89CODE
LOWsrc/chatterbox/models/s3gen/matcha/decoder.py345CODE
LOWsrc/chatterbox/models/s3gen/matcha/transformer.py96CODE
Hyper-Verbose Identifiers6 hits · 6 pts
SeverityFileLineSnippetContext
LOWmultilingual_app.py120def get_supported_languages_display() -> str:CODE
LOWsrc/chatterbox/models/t3/inference/t3_hf_backend.py34 def prepare_inputs_for_generation(CODE
LOWsrc/chatterbox/models/t3/modules/perceiver.py22 def _relative_position_bucket(relative_position, causal=True, num_buckets=32, max_distance=128):CODE
LOWsrc/chatterbox/models/t3/modules/perceiver.py84 def scaled_dot_product_attention(self, q, k, v, mask=None):CODE
LOWsrc/chatterbox/models/s3gen/utils/mel.py15def dynamic_range_compression_torch(x, C=1, clip_val=1e-5):CODE
LOWsrc/chatterbox/models/s3gen/utils/intmeanflow.py5def get_intmeanflow_time_mixer(dims):CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/chatterbox/vc.py63 # Check if MPS is available on macOSCOMMENT
LOWsrc/chatterbox/tts.py169 # Check if MPS is available on macOSCOMMENT
LOWsrc/chatterbox/tts_turbo.py187 # Check if MPS is available on macOSCOMMENT
LOWsrc/chatterbox/mtl_tts.py233 # Check if MPS is available on macOSCOMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/chatterbox/models/s3gen/transformer/convolution.py124 # It's better we just return None if no cache is required,COMMENT