Repository Analysis

resemble-ai/chatterbox

SoTA open-source TTS

18.9 Moderate AI signal View on GitHub
18.9
Adjusted Score
18.9
Raw Score
100%
Time Factor
2026-05-20
Last Push
24,900
Stars
Python
Language
9,697
Lines of Code
61
Files
96
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 18MEDIUM 11LOW 67

Pattern Findings

96 matches across 11 categories. Click a row to expand file-level details.

Cross-File Repetition9 hits · 45 pts
SeverityFileLineSnippet
HIGHsrc/chatterbox/tts.py0quick cleanup func for punctuation from llms or containing chars not seen often in the dataset
HIGHsrc/chatterbox/tts_turbo.py0quick cleanup func for punctuation from llms or containing chars not seen often in the dataset
HIGHsrc/chatterbox/mtl_tts.py0quick cleanup func for punctuation from llms or containing chars not seen often in the dataset
HIGHsrc/chatterbox/tts.py0conditionals for t3 and s3gen - t3 conditionals: - speaker_emb - clap_emb - cond_prompt_speech_tokens - cond_prompt_spee
HIGHsrc/chatterbox/tts_turbo.py0conditionals for t3 and s3gen - t3 conditionals: - speaker_emb - clap_emb - cond_prompt_speech_tokens - cond_prompt_spee
HIGHsrc/chatterbox/mtl_tts.py0conditionals for t3 and s3gen - t3 conditionals: - speaker_emb - clap_emb - cond_prompt_speech_tokens - cond_prompt_spee
HIGHsrc/chatterbox/models/s3gen/transformer/subsampling.py0input x. args: x (torch.tensor): input tensor (#batch, time, idim). x_mask (torch.tensor): input mask (#batch, 1, time).
HIGHsrc/chatterbox/models/s3gen/transformer/subsampling.py0input x. args: x (torch.tensor): input tensor (#batch, time, idim). x_mask (torch.tensor): input mask (#batch, 1, time).
HIGHsrc/chatterbox/models/s3gen/transformer/subsampling.py0input x. args: x (torch.tensor): input tensor (#batch, time, idim). x_mask (torch.tensor): input mask (#batch, 1, time).
Docstring Block Structure6 hits · 30 pts
SeverityFileLineSnippet
HIGHsrc/chatterbox/models/s3gen/decoder.py244Forward pass of the UNet1DConditional model. Args: x: (B, 80, T) mask (_type_)
HIGHsrc/chatterbox/models/s3gen/xvector.py16Perform padding for the list of tensors. Args: xs (List): List of Tensors [(T_1, `*`), (T_2, `*`), ..., (T_
HIGHsrc/chatterbox/models/s3gen/utils/mask.py19 def subsequent_mask( size: int, device: torch.device = torch.device("cpu"), ) -> torch.Tensor: """C
HIGHsrc/chatterbox/models/s3gen/utils/mask.py60Create mask for subsequent steps (size, size) with chunk size, this is for streaming encoder Args: s
HIGHsrc/chatterbox/models/s3gen/utils/mask.py168Make mask tensor containing indices of padded part. See description of make_non_pad_mask. Args: length
HIGHsrc/chatterbox/models/s3gen/matcha/decoder.py364Forward pass of the UNet1DConditional model. Args: x (torch.Tensor): shape (batch_size, in_channels
Unused Imports24 hits · 24 pts
SeverityFileLineSnippet
LOWexample_tts_turbo.py2
LOWsrc/chatterbox/__init__.py9
LOWsrc/chatterbox/__init__.py10
LOWsrc/chatterbox/__init__.py11
LOWsrc/chatterbox/__init__.py11
LOWsrc/chatterbox/models/tokenizers/__init__.py1
LOWsrc/chatterbox/models/tokenizers/__init__.py1
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1
LOWsrc/chatterbox/models/s3tokenizer/__init__.py1
LOWsrc/chatterbox/models/t3/__init__.py1
LOWsrc/chatterbox/models/t3/t3.py4
LOWsrc/chatterbox/models/t3/t3.py4
LOWsrc/chatterbox/models/t3/inference/t3_hf_backend.py4
LOWsrc/chatterbox/models/t3/modules/learned_pos_emb.py1
LOWsrc/chatterbox/models/t3/modules/learned_pos_emb.py4
LOWsrc/chatterbox/models/voice_encoder/__init__.py1
LOWsrc/chatterbox/models/voice_encoder/__init__.py1
LOWsrc/chatterbox/models/s3gen/__init__.py1
LOWsrc/chatterbox/models/s3gen/__init__.py2
LOWsrc/chatterbox/models/s3gen/flow.py23
LOWsrc/chatterbox/models/s3gen/flow_matching.py14
Over-Commented Block19 hits · 19 pts
SeverityFileLineSnippet
LOWsrc/chatterbox/models/t3/t3.py281 speech_head=self.speech_head,
LOWsrc/chatterbox/models/s3gen/decoder.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Zhihao Du)
LOWsrc/chatterbox/models/s3gen/flow.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Zhihao Du)
LOWsrc/chatterbox/models/s3gen/hifigan.py1# jrm: adapted from CosyVoice/cosyvoice/hifigan/generator.py
LOWsrc/chatterbox/models/s3gen/f0_predictor.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Kai Hu)
LOWsrc/chatterbox/models/s3gen/s3gen.py1# Modified from CosyVoice https://github.com/FunAudioLLM/CosyVoice
LOWsrc/chatterbox/models/s3gen/flow_matching.py1# Copyright (c) 2024 Alibaba Inc (authors: Xiang Lyu, Zhihao Du)
LOWsrc/chatterbox/models/s3gen/transformer/attention.py1# Copyright (c) 2019 Shigeki Karita
LOWsrc/chatterbox/models/s3gen/transformer/attention.py161 Returns:
LOWsrc/chatterbox/models/s3gen/transformer/attention.py281 # cache(1, head, 0, d_k * 2) (16/-1, -1/-1, 16/0 mode)
LOWsrc/chatterbox/models/s3gen/transformer/subsampling.py1# Copyright (c) 2021 Mobvoi Inc (Binbin Zhang, Di Wu)
LOWsrc/chatterbox/models/s3gen/transformer/convolution.py1# Copyright (c) 2020 Mobvoi Inc. (authors: Binbin Zhang, Di Wu)
LOW…hatterbox/models/s3gen/transformer/upsample_encoder.py1# Copyright (c) 2021 Mobvoi Inc (Binbin Zhang, Di Wu)
LOWsrc/chatterbox/models/s3gen/transformer/embedding.py1# Copyright (c) 2020 Mobvoi Inc. (authors: Binbin Zhang, Di Wu)
LOW…c/chatterbox/models/s3gen/transformer/encoder_layer.py1# Copyright (c) 2021 Mobvoi Inc (Binbin Zhang, Di Wu)
LOWsrc/chatterbox/models/s3gen/transformer/activation.py1# Copyright (c) 2020 Johns Hopkins University (Shinji Watanabe)
LOW…/models/s3gen/transformer/positionwise_feed_forward.py1# Copyright (c) 2019 Shigeki Karita
LOWsrc/chatterbox/models/s3gen/utils/class_utils.py1# Copyright [2023-11-28] <sxc19@mails.tsinghua.edu.cn, Xingchen Song>
LOWsrc/chatterbox/models/s3gen/utils/mask.py1# Copyright (c) 2019 Shigeki Karita
Dead Code9 hits · 18 pts
SeverityFileLineSnippet
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py63
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py64
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py66
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py69
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py70
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py71
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py73
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py74
MEDIUMsrc/chatterbox/models/s3gen/flow_matching.py76
Cross-Language Confusion3 hits · 15 pts
SeverityFileLineSnippet
HIGHgradio_tts_turbo_app.py62 if (end < current_text.length && current_text[end] === ' ') suffix = "";
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 Hi
HIGHgradio_tts_app.py62 top_p = gr.Slider(0.00, 1.00, step=0.01, label="top_p || Original Sampler. 1.0 Disables(recommended). Or
Excessive Try-Catch Wrapping8 hits · 12 pts
SeverityFileLineSnippet
LOWmultilingual_app.py150 except Exception as e:
MEDIUMmultilingual_app.py151 print(f"Error loading model: {e}")
LOWmultilingual_app.py158except Exception as e:
LOWsrc/chatterbox/tts_turbo.py212 except Exception as e:
MEDIUMsrc/chatterbox/tts_turbo.py204def norm_loudness(self, wav, sr, target_lufs=-27):
LOWsrc/chatterbox/models/tokenizers/tokenizer.py131 except Exception as e:
LOWsrc/chatterbox/models/tokenizers/tokenizer.py187 except Exception as e:
LOWsrc/chatterbox/models/tokenizers/tokenizer.py251 except Exception as e:
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippet
LOWsrc/chatterbox/models/tokenizers/tokenizer.py75
LOWsrc/chatterbox/models/tokenizers/tokenizer.py285
LOWsrc/chatterbox/models/s3gen/decoder.py229
LOWsrc/chatterbox/models/s3gen/xvector.py130
LOWsrc/chatterbox/models/s3gen/utils/mask.py89
LOWsrc/chatterbox/models/s3gen/matcha/decoder.py345
LOWsrc/chatterbox/models/s3gen/matcha/transformer.py96
Hyper-Verbose Identifiers6 hits · 6 pts
SeverityFileLineSnippet
LOWmultilingual_app.py120def get_supported_languages_display() -> str:
LOWsrc/chatterbox/models/t3/inference/t3_hf_backend.py34 def prepare_inputs_for_generation(
LOWsrc/chatterbox/models/t3/modules/perceiver.py22 def _relative_position_bucket(relative_position, causal=True, num_buckets=32, max_distance=128):
LOWsrc/chatterbox/models/t3/modules/perceiver.py84 def scaled_dot_product_attention(self, q, k, v, mask=None):
LOWsrc/chatterbox/models/s3gen/utils/mel.py15def dynamic_range_compression_torch(x, C=1, clip_val=1e-5):
LOWsrc/chatterbox/models/s3gen/utils/intmeanflow.py5def get_intmeanflow_time_mixer(dims):
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippet
LOWsrc/chatterbox/vc.py63 # Check if MPS is available on macOS
LOWsrc/chatterbox/tts.py169 # Check if MPS is available on macOS
LOWsrc/chatterbox/tts_turbo.py187 # Check if MPS is available on macOS
LOWsrc/chatterbox/mtl_tts.py233 # Check if MPS is available on macOS
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/chatterbox/models/s3gen/transformer/convolution.py124 # It's better we just return None if no cache is required,