Repository Analysis

Blaizzy/mlx-audio

A text-to-speech (TTS), speech-to-text (STT) and speech-to-speech (STS) library built on Apple's MLX framework, providing efficient speech analysis on Apple Silicon.

17.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of Blaizzy/mlx-audio, a Python project with 7,674 GitHub stars. SynthScan v2.0 examined 209,340 lines of code across 846 source files, recording 2965 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 17.5 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).

17.5
Adjusted Score
17.5
Raw Score
100%
Time Factor
2026-07-31
Last Push
7.7K
Stars
Python
Language
209.3K
Lines of Code
846
Files
3.0K
Pattern Hits
2026-08-02
Scan Date
0.04
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

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.

No multi-scan history yet — run the scanner again to build trend data.

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 36MEDIUM 284LOW 2645

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 2965 distinct pattern matches across 19 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.

Hyper-Verbose Identifiers1154 hits · 1050 pts
SeverityFileLineSnippetContext
LOWmlx_audio/server.py239def _load_model_for_inference(model_name: str):CODE
LOWmlx_audio/server.py429 def _cancel_disconnected_requests(self) -> None:CODE
LOWmlx_audio/server.py544 def _can_call_continuous_session(self, model, request: InferenceRequest) -> bool:CODE
LOWmlx_audio/server.py557 def supports_continuous_batch(self, request: InferenceRequest) -> bool:CODE
LOWmlx_audio/server.py581 def create_continuous_batch_session(self, request: InferenceRequest):CODE
LOWmlx_audio/server.py855async def _stream_inference_results(handle: InferenceHandle, request: Request):CODE
LOWmlx_audio/server.py1242async def stt_realtime_transcriptions(websocket: WebSocket):CODE
LOWmlx_audio/server.py1480def _default_transcription_delay_ms() -> Optional[int]:CODE
LOWmlx_audio/server.py1521def _resolve_realtime_model_name(requested_model: Optional[str]) -> Optional[str]:CODE
LOWmlx_audio/server_inference.py76 def supports_continuous_batch(self, request: InferenceRequest) -> bool: ...CODE
LOWmlx_audio/server_inference.py80 def create_continuous_batch_session(CODE
LOWmlx_audio/server_inference.py115 def supports_continuous_batch(self, request: InferenceRequest) -> bool:CODE
LOWmlx_audio/server_inference.py122 def create_continuous_batch_session(CODE
LOWmlx_audio/server_inference.py315 def _route_continuous_requests(self, pending: list[InferenceRequest]) -> None:CODE
LOWmlx_audio/server_inference.py347 def _step_continuous_sessions(self) -> None:CODE
LOWmlx_audio/convert.py154def _discover_detection_hints(domain: str) -> dict:CODE
LOWmlx_audio/audio_io.py37def _detect_format_from_bytes(data: bytes) -> str:CODE
LOWmlx_audio/utils.py519def random_select_audio_segment(audio, length: int):CODE
LOWmlx_audio/ui/app/speech-to-text/realtime/page.tsx10export default function RealtimeTranscriptionPage() {CODE
LOWmlx_audio/codec/tests/test_moss_audio_tokenizer.py58 def test_parent_config_defaults_to_mono(self):CODE
LOWmlx_audio/codec/tests/test_moss_audio_tokenizer.py72 def test_import_from_codec_models(self):CODE
LOWmlx_audio/codec/tests/test_moss_audio_tokenizer.py75 def test_from_pretrained_tiny_tokenizer_encode_decode(self):CODE
LOWmlx_audio/codec/tests/test_moss_audio_tokenizer.py94 def test_streaming_decoder_matches_offline_without_decoder_modules(self):CODE
LOWmlx_audio/codec/tests/test_moss_audio_tokenizer.py115 def test_streaming_decoder_matches_offline_with_causal_transformer(self):CODE
LOWmlx_audio/codec/tests/test_moss_audio_tokenizer.py174 def test_from_model_dir_prefers_nested_audio_tokenizer(self):CODE
LOWmlx_audio/codec/tests/test_moss_audio_tokenizer.py188 def test_same_dimension_projection_keys_force_linear_modules(self):CODE
LOWmlx_audio/codec/tests/test_stepaudio2.py9 def test_tiny_dit_forward_shape(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py143 def test_global_context_changes_attention_input(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py155 def test_output_shape_default_config(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py165 def test_output_shape_spark_config(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py177 def test_submodules_accessible(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py201 def test_import_from_codec_models(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py206 def test_import_from_codec_top_level(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py233 def test_different_inputs_give_different_outputs(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py247 def test_lid_ecapa_uses_shared_backbone(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py256 def test_lid_forward_pass_unchanged(self):CODE
LOWmlx_audio/codec/tests/test_ecapa_backbone.py267 def test_lid_predict_unchanged(self):CODE
LOWmlx_audio/codec/tests/test_mimi.py23 def test_convtranspose_materializes_expanded_weight(self):CODE
LOWmlx_audio/codec/tests/test_mimi.py31 def test_codebook_materializes_derived_lookup_arrays(self):CODE
LOWmlx_audio/codec/tests/test_mimi.py42 def test_from_pretrained_materializes_loaded_parameters(self):CODE
LOWmlx_audio/codec/models/fish_s1_dac/fish_s1_dac.py1305 def transformer_general_config(**kw):CODE
LOW…ec/models/moss_audio_tokenizer/moss_audio_tokenizer.py66def _normalize_weight_except_dim(weight: mx.array, except_dim: int) -> mx.array:CODE
LOW…ec/models/moss_audio_tokenizer/moss_audio_tokenizer.py114def _sanitize_audio_tokenizer_weights(CODE
LOW…ec/models/moss_audio_tokenizer/moss_audio_tokenizer.py127def _resolve_audio_tokenizer_dir(source: str | Path) -> Path:CODE
LOW…ec/models/moss_audio_tokenizer/moss_audio_tokenizer.py906 def _flatten_channels_for_codec(CODE
LOW…ec/models/moss_audio_tokenizer/moss_audio_tokenizer.py923 def _restore_channels_from_codec(CODE
LOWmlx_audio/codec/models/higgs_audio/config.py42 def semantic_downsample_factor(self) -> int:CODE
LOWmlx_audio/codec/models/higgs_audio/higgs_audio.py253 def from_higgs_tts_checkpoint(CODE
LOWmlx_audio/codec/models/higgs_audio/higgs_audio.py289 def _load_shard_codec_tensors(CODE
LOWmlx_audio/codec/models/stepaudio2/convert.py169def sanitize_campplus_onnx_weights(model, onnx_path: str | Path) -> Dict[str, mx.array]:CODE
LOWmlx_audio/codec/models/encodec/encodec.py506 def get_num_quantizers_for_bandwidth(CODE
LOWmlx_audio/tests/test_lazy_imports.py11def test_stt_utils_no_eager_imports():CODE
LOWmlx_audio/tests/test_lazy_imports.py28def test_tts_utils_no_eager_imports():STRING
LOWmlx_audio/tests/test_lazy_imports.py45def test_sts_utils_no_eager_imports():STRING
LOWmlx_audio/tests/test_lazy_imports.py62def test_codec_no_eager_imports():STRING
LOWmlx_audio/tests/test_realtime_vad.py27def test_parse_none_is_manual_mode():CODE
LOWmlx_audio/tests/test_realtime_vad.py32def test_parse_server_vad_defaults_match_openai():CODE
LOWmlx_audio/tests/test_realtime_vad.py39def test_parse_server_vad_custom_values_round_trip():CODE
LOWmlx_audio/tests/test_realtime_vad.py57def test_parse_semantic_vad_is_rejected():CODE
LOWmlx_audio/tests/test_realtime_vad.py62def test_parse_unknown_type_is_rejected():CODE
1094 more matches not shown…
Unused Imports813 hits · 804 pts
SeverityFileLineSnippetContext
LOWmlx_audio/server_inference.py1CODE
LOWmlx_audio/registry.py10CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/utils.py31CODE
LOWmlx_audio/realtime_vad.py18CODE
LOWmlx_audio/codec/__init__.py1CODE
LOWmlx_audio/codec/__init__.py1CODE
LOWmlx_audio/codec/__init__.py1CODE
LOWmlx_audio/codec/__init__.py1CODE
LOWmlx_audio/codec/__init__.py1CODE
LOWmlx_audio/codec/__init__.py1CODE
LOWmlx_audio/codec/__init__.py1CODE
LOWmlx_audio/codec/models/__init__.py1CODE
LOWmlx_audio/codec/models/__init__.py2CODE
LOWmlx_audio/codec/models/__init__.py3CODE
LOWmlx_audio/codec/models/__init__.py4CODE
LOWmlx_audio/codec/models/__init__.py5CODE
LOWmlx_audio/codec/models/__init__.py6CODE
LOWmlx_audio/codec/models/__init__.py7CODE
LOWmlx_audio/codec/models/__init__.py8CODE
LOWmlx_audio/codec/models/s3/__init__.py1CODE
LOWmlx_audio/codec/models/s3/__init__.py1CODE
LOWmlx_audio/codec/models/s3/__init__.py2CODE
LOWmlx_audio/codec/models/s3/__init__.py2CODE
LOWmlx_audio/codec/models/s3/__init__.py2CODE
LOWmlx_audio/codec/models/s3/__init__.py2CODE
LOWmlx_audio/codec/models/s3/__init__.py2CODE
LOWmlx_audio/codec/models/s3/model.py2CODE
LOWmlx_audio/codec/models/fish_s1_dac/__init__.py1CODE
LOWmlx_audio/codec/models/fish_s1_dac/__init__.py1CODE
LOWmlx_audio/codec/models/fish_s1_dac/__init__.py1CODE
LOWmlx_audio/codec/models/fish_s1_dac/fish_s1_dac.py1CODE
LOWmlx_audio/codec/models/mimi/__init__.py1CODE
LOWmlx_audio/codec/models/mimi/__init__.py1CODE
LOWmlx_audio/codec/models/mimi/modules/quantization.py5CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py7CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py7CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py9CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py19CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py19CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py20CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py20CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py20CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py21CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py21CODE
LOWmlx_audio/codec/models/mimi/modules/__init__.py21CODE
LOWmlx_audio/codec/models/mimi/modules/transformer.py5CODE
753 more matches not shown…
Decorative Section Separators238 hits · 741 pts
SeverityFileLineSnippetContext
MEDIUMmlx_audio/dsp.py743# =============================================================================COMMENT
MEDIUMmlx_audio/dsp.py745# =============================================================================COMMENT
MEDIUMmlx_audio/utils.py78# =============================================================================COMMENT
MEDIUMmlx_audio/utils.py80# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py45# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py47# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py252# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py254# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py325# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py327# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py387# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py389# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py462# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py464# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py617# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py619# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py783# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py785# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py908# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py910# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py960# =============================================================================COMMENT
MEDIUMmlx_audio/codec/models/dacvae/codec.py962# =============================================================================COMMENT
MEDIUMmlx_audio/tests/test_server.py257# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tests/test_server.py259# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tests/test_server.py795# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tests/test_server.py797# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tests/test_server.py361# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tests/test_server.py363# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/lid/models/ecapa_tdnn/ecapa_tdnn.py18# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/lid/models/ecapa_tdnn/ecapa_tdnn.py20# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/lid/models/ecapa_tdnn/ecapa_tdnn.py76# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/lid/models/ecapa_tdnn/ecapa_tdnn.py78# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4108# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4110# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4475# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4477# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4030# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4032# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4535# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4537# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4802# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py4804# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py7268# ── VoxCPM2 ──────────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py8888# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/tests/test_models.py8890# ---------------------------------------------------------------------------COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1017# ─────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1019# ─────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1025 # ── Numbers ────────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1035 # ── Scientific notation ─────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1039 # ── Scale suffixes ─────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1043 # ── Currency ───────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1047 # ── Percentages ────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1050 # ── Ordinals ───────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1055 # ── Fractions ──────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1060 # ── Time ───────────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1065 # ── Decades ────────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1071 # ── Ranges ─────────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1075 # ── Model / version names ───────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1081 # ── Units ──────────────────────────────────────────────────────COMMENT
MEDIUMmlx_audio/tts/models/kitten_tts/preprocess.py1088 # ── HTML / URLs / emails ───────────────────────────────────────COMMENT
178 more matches not shown…
Deep Nesting198 hits · 190 pts
SeverityFileLineSnippetContext
LOWmlx_audio/server.py66CODE
LOWmlx_audio/server.py1012CODE
LOWmlx_audio/server.py1242CODE
LOWmlx_audio/server.py1567CODE
LOWmlx_audio/server.py282CODE
LOWmlx_audio/server_inference.py195CODE
LOWmlx_audio/convert.py154CODE
LOWmlx_audio/convert.py271CODE
LOWmlx_audio/audio_io.py37CODE
LOWmlx_audio/audio_io.py188CODE
LOWmlx_audio/audio_io.py337CODE
LOWmlx_audio/audio_io.py418CODE
LOWmlx_audio/utils.py754CODE
LOWmlx_audio/utils.py807CODE
LOWmlx_audio/codec/models/s3/model_v2.py378CODE
LOWmlx_audio/codec/models/s3/model_v2.py543CODE
LOWmlx_audio/codec/models/fish_s1_dac/fish_s1_dac.py1216CODE
LOWmlx_audio/codec/models/higgs_audio/higgs_audio.py182CODE
LOWmlx_audio/codec/models/bigvgan/bigvgan.py124CODE
LOWmlx_audio/codec/models/stepaudio2/convert.py70CODE
LOWmlx_audio/codec/models/stepaudio2/convert.py169CODE
LOWmlx_audio/codec/models/descript/base.py107CODE
LOWmlx_audio/codec/models/dacvae/codec.py1170CODE
LOWmlx_audio/codec/models/dacvae/codec.py1364CODE
LOWmlx_audio/lid/models/ecapa_tdnn/mel.py27CODE
LOWmlx_audio/tts/generate.py151CODE
LOWmlx_audio/tts/audio_player.py73CODE
LOWmlx_audio/tts/models/moss_tts_nano/text.py251CODE
LOWmlx_audio/tts/models/voxcpm2/audio_vae.py450CODE
LOWmlx_audio/tts/models/voxcpm2/voxcpm2.py315CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py147CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py210CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py271CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py352CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py780CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py1018CODE
LOW…udio/tts/models/chatterbox_turbo/models/s3gen/s3gen.py415CODE
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py45CODE
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py696CODE
LOWmlx_audio/tts/models/kugelaudio/kugelaudio.py394CODE
LOWmlx_audio/tts/models/kitten_tts/convert.py187CODE
LOWmlx_audio/tts/models/kitten_tts/convert.py229CODE
LOWmlx_audio/tts/models/kitten_tts/convert.py528CODE
LOWmlx_audio/tts/models/kitten_tts/kitten_tts.py42CODE
LOWmlx_audio/tts/models/kitten_tts/kitten_tts.py512CODE
LOWmlx_audio/tts/models/kitten_tts/kitten_tts.py541CODE
LOWmlx_audio/tts/models/vibevoice/vibevoice.py209CODE
LOWmlx_audio/tts/models/vibevoice/vibevoice.py559CODE
LOWmlx_audio/tts/models/vibevoice/scheduler.py234CODE
LOWmlx_audio/tts/models/zonos2/model.py850CODE
LOWmlx_audio/tts/models/zonos2/speaker_encoder.py40CODE
LOWmlx_audio/tts/models/omnivoice/omnivoice.py266CODE
LOWmlx_audio/tts/models/omnivoice/omnivoice.py293CODE
LOWmlx_audio/tts/models/omnivoice/convert.py33CODE
LOWmlx_audio/tts/models/irodori_tts/model.py737CODE
LOWmlx_audio/tts/models/irodori_tts/model.py929CODE
LOWmlx_audio/tts/models/irodori_tts/sampling.py72CODE
LOWmlx_audio/tts/models/qwen3/qwen3.py291CODE
LOWmlx_audio/tts/models/higgs_audio/serve.py593CODE
LOWmlx_audio/tts/models/higgs_audio/higgs_audio.py271CODE
138 more matches not shown…
AI Structural Patterns170 hits · 167 pts
SeverityFileLineSnippetContext
LOWmlx_audio/dsp.py886CODE
LOWmlx_audio/server.py1012CODE
LOWmlx_audio/convert.py542CODE
LOWmlx_audio/codec/models/fish_s1_dac/fish_s1_dac.py792CODE
LOWmlx_audio/codec/models/fish_s1_dac/fish_s1_dac.py1101CODE
LOWmlx_audio/codec/models/bigvgan/resample.py98CODE
LOW…x_audio/codec/models/stepaudio2/upsample_encoder_v2.py81CODE
LOWmlx_audio/codec/models/stepaudio2/flow.py10CODE
LOWmlx_audio/codec/models/snac/snac.py16CODE
LOWmlx_audio/codec/models/descript/dac.py133CODE
LOWmlx_audio/codec/models/dacvae/codec.py260CODE
LOWmlx_audio/codec/models/dacvae/codec.py905CODE
LOWmlx_audio/codec/models/dacvae/codec.py1067CODE
LOWmlx_audio/tts/generate.py151CODE
LOWmlx_audio/tts/utils.py211CODE
LOWmlx_audio/tts/models/interpolate.py112CODE
LOWmlx_audio/tts/models/base.py68CODE
LOWmlx_audio/tts/models/moss_tts_nano/moss_tts_nano.py335CODE
LOWmlx_audio/tts/models/voxcpm2/voxcpm2.py404CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py780CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py1018CODE
LOW…io/tts/models/chatterbox_turbo/models/s3gen/decoder.py431CODE
LOW…io/tts/models/chatterbox_turbo/models/s3gen/hifigan.py334CODE
LOW…_audio/tts/models/chatterbox_turbo/models/s3gen/mel.py56CODE
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py104CODE
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py281CODE
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py336CODE
LOWmlx_audio/tts/models/kitten_tts/istftnet.py837CODE
LOWmlx_audio/tts/models/kitten_tts/istftnet.py930CODE
LOWmlx_audio/tts/models/kitten_tts/preprocess.py909CODE
LOWmlx_audio/tts/models/vibevoice/scheduler.py54CODE
LOWmlx_audio/tts/models/zonos2/model.py850CODE
LOWmlx_audio/tts/models/zonos2/model.py1008CODE
LOWmlx_audio/tts/models/zonos2/prompt.py315CODE
LOWmlx_audio/tts/models/omnivoice/omnivoice.py293CODE
LOWmlx_audio/tts/models/omnivoice/omnivoice.py483CODE
LOWmlx_audio/tts/models/irodori_tts/model.py737CODE
LOWmlx_audio/tts/models/irodori_tts/irodori_tts.py216CODE
LOWmlx_audio/tts/models/irodori_tts/sampling.py72CODE
LOWmlx_audio/tts/models/echo_tts/sampling.py53CODE
LOWmlx_audio/tts/models/echo_tts/sampling.py164CODE
LOWmlx_audio/tts/models/qwen3/qwen3.py291CODE
LOWmlx_audio/tts/models/higgs_audio/generation.py77CODE
LOWmlx_audio/tts/models/higgs_audio/serve.py593CODE
LOWmlx_audio/tts/models/higgs_audio/serve.py420CODE
LOWmlx_audio/tts/models/higgs_audio/serve.py485CODE
LOWmlx_audio/tts/models/higgs_audio/serve.py534CODE
LOWmlx_audio/tts/models/higgs_audio/model.py121CODE
LOWmlx_audio/tts/models/higgs_audio/higgs_audio.py413CODE
LOWmlx_audio/tts/models/chatterbox/chatterbox.py719CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/decoder.py23CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/decoder.py173CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/flow.py9CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/hifigan.py408CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/hifigan.py421CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/mel.py22CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/xvector.py209CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/xvector.py517CODE
LOW…odels/chatterbox/s3gen/transformer/upsample_encoder.py188CODE
LOW…odels/chatterbox/s3gen/transformer/upsample_encoder.py273CODE
110 more matches not shown…
Excessive Try-Catch Wrapping118 hits · 136 pts
SeverityFileLineSnippetContext
MEDIUMmlx_audio/server.py1411 print(f"Error during initial transcription: {error_msg}")CODE
MEDIUMmlx_audio/server.py1445 print(f"Error during transcription: {error_msg}")CODE
LOWmlx_audio/server.py1456 except Exception:CODE
LOWmlx_audio/server.py1461 except Exception as e:CODE
LOWmlx_audio/server.py1464 except Exception:CODE
LOWmlx_audio/server.py1469 except Exception:CODE
LOWmlx_audio/server.py1940 except Exception as e:CODE
LOWmlx_audio/server.py1946 except Exception:CODE
LOWmlx_audio/server.py1951 except Exception:CODE
LOWmlx_audio/server.py271 except Exception as exc:CODE
LOWmlx_audio/server.py996 except Exception as e:CODE
LOWmlx_audio/server.py1099 except Exception:CODE
LOWmlx_audio/server.py1298 except Exception:CODE
LOWmlx_audio/server.py1406 except Exception as e:CODE
LOWmlx_audio/server.py1440 except Exception as e:CODE
LOWmlx_audio/server.py1623 except Exception as e:CODE
LOWmlx_audio/server.py1757 except Exception as e:CODE
LOWmlx_audio/server.py1790 except Exception as e:CODE
LOWmlx_audio/server.py1997 except Exception as e:CODE
LOWmlx_audio/server_inference.py248 except Exception as exc: # pragma: no cover - defensive broker guardCODE
LOWmlx_audio/server_inference.py340 except Exception as exc:CODE
LOWmlx_audio/server_inference.py351 except Exception as exc:CODE
LOWmlx_audio/convert.py437 except Exception:CODE
LOWmlx_audio/tests/test_server.py137 except Exception as e:CODE
LOWmlx_audio/tests/test_server.py449 except Exception:CODE
LOWmlx_audio/tts/generate.py445 except Exception as e:CODE
MEDIUMmlx_audio/tts/generate.py446 print(f"Error loading model: {e}")CODE
MEDIUMmlx_audio/tts/tests/test_models.py224def run_sine_generator():CODE
MEDIUMmlx_audio/tts/tests/test_models.py7034def _require_g2p(self):CODE
LOWmlx_audio/tts/tests/test_models.py229 except Exception as exc:CODE
LOWmlx_audio/tts/tests/test_models.py3241 except Exception:CODE
LOWmlx_audio/tts/tests/test_models.py3262 except Exception:CODE
LOWmlx_audio/tts/tests/test_models.py7725 except Exception:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py295 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py313 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py344 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py414 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py424 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py500 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py537 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py587 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py641 except Exception as e:CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py1301 except Exception as e:CODE
LOWmlx_audio/tts/models/kitten_tts/istftnet.py169 except Exception as e:CODE
MEDIUMmlx_audio/tts/models/kitten_tts/istftnet.py170 print(f"Error: {e}")CODE
LOWmlx_audio/tts/models/kitten_tts/preprocess.py503 except Exception:CODE
LOWmlx_audio/tts/models/kitten_tts/kitten_tts.py578 except Exception:CODE
LOWmlx_audio/tts/models/omnivoice/omnivoice.py670 except Exception as e:CODE
LOWmlx_audio/tts/models/omnivoice/omnivoice.py680 except Exception as e:CODE
LOWmlx_audio/tts/models/irodori_tts/irodori_tts.py110 except Exception as e:CODE
LOWmlx_audio/tts/models/echo_tts/echo_tts.py88 except Exception:CODE
LOWmlx_audio/tts/models/chatterbox/chatterbox.py825 except Exception as e:CODE
MEDIUMmlx_audio/tts/models/chatterbox/chatterbox.py826 print(f"Error tokenizing text: {e}")CODE
LOWmlx_audio/tts/models/chatterbox/tokenizer.py135 except Exception as e:CODE
LOWmlx_audio/tts/models/chatterbox/tokenizer.py187 except Exception as e:CODE
LOWmlx_audio/tts/models/chatterbox/tokenizer.py255 except Exception as e:CODE
MEDIUMmlx_audio/tts/models/chatterbox/tokenizer.py170def _load_cangjie_mapping(self, model_dir=None):CODE
LOWmlx_audio/tts/models/tada/tada.py1486 except Exception as e:CODE
LOWmlx_audio/tts/models/tada/tada.py1492 except Exception as e:CODE
LOWmlx_audio/tts/models/tada/tada.py485 except Exception as e:CODE
58 more matches not shown…
Docstring Block Structure21 hits · 105 pts
SeverityFileLineSnippetContext
HIGHmlx_audio/server.py929 Remove a model from the API. Args: model_name (str): The name of the model to remove. Returns: STRING
HIGHmlx_audio/audio_io.py62Decode audio using ffmpeg (for formats not supported by miniaudio like M4A). Args: input_data: Path to the STRING
HIGHmlx_audio/utils.py114 Ensures the model is available locally. If the path does not exist locally, it is downloaded from the Hugging FSTRING
HIGHmlx_audio/utils.py156Load model configuration from a path or Hugging Face repo. Args: model_path: Local path or Hugging Face repSTRING
HIGHmlx_audio/utils.py180Load model weights from safetensors or npz files. Args: model_path: Path to the model directory ReturnSTRING
HIGHmlx_audio/utils.py265 Retrieve the model architecture module based on the model type and name. Args: model_type: The type ofSTRING
HIGHmlx_audio/utils.py648Load audio from file path or return mx.array as-is. Args: audio: Audio input - can be: - str: PSTRING
HIGHmlx_audio/utils.py854Load a TTS, STT, STS, LID, or VAD model based on its configuration and name. Args: model_name (str): Name oSTRING
HIGHmlx_audio/lid/models/wav2vec2/wav2vec_lid.py106Predict language from raw audio waveform. Automatically applies zero-mean unit-variance normalization bSTRING
HIGHmlx_audio/tts/generate.py27Detect the start and end points of speech in an audio signal using RMS energy. Args: wav: Input audio signaSTRING
HIGHmlx_audio/tts/generate.py71Remove silence from both ends of an audio signal. Args: wav: Input audio signal array sample_rate: STRING
HIGHmlx_audio/tts/utils.py72 Retrieve the model architecture module based on the model type and name. This function attempts to find the apSTRING
HIGHmlx_audio/tts/utils.py106 Load and initialize the model from a given path. Args: model_path (Path): The path to load the model fSTRING
HIGH…odels/chatterbox/s3gen/transformer/upsample_encoder.py129Make mask tensor containing indices of padded part. Args: lengths: Batch of lengths (B,). max_len: STRING
HIGH…odels/chatterbox/s3gen/transformer/upsample_encoder.py164Create mask for subsequent steps (size, size) with chunk size. This is for streaming encoder. Args: siSTRING
HIGHmlx_audio/tts/models/dia/config.py239Load and validate a Dia configuration from a JSON file. Args: path: The path to the configuration fSTRING
HIGHmlx_audio/tts/models/dia/dia.py50Loads the Dia model from local configuration and checkpoint files. Args: config_path: Path to the cSTRING
HIGHmlx_audio/tts/models/dia/dia.py85Loads the Dia model from a Hugging Face Hub repository. Downloads the configuration and checkpoint files from tSTRING
HIGHmlx_audio/tts/models/kokoro/pipeline.py312Generate audio from either raw phonemes or pre-processed tokens. Args: tokens: Either a phoneme strSTRING
HIGHmlx_audio/tts/models/spark/utils/audio.py144Detect the start and end points of speech in an audio signal using RMS energy. Args: wav: Input audio signaSTRING
HIGHmlx_audio/tts/models/spark/utils/audio.py188Remove silence from both ends of an audio signal. Args: wav: Input audio signal array sample_rate: STRING
Modern Structural Boilerplate91 hits · 91 pts
SeverityFileLineSnippetContext
LOWmlx_audio/dsp.py10__all__ = [CODE
LOWmlx_audio/utils.py707__all__ = [CODE
LOWmlx_audio/codec/__init__.py11__all__ = [CODE
LOWmlx_audio/codec/models/__init__.py10__all__ = [CODE
LOWmlx_audio/codec/models/s3/__init__.py17__all__ = [CODE
LOWmlx_audio/codec/models/fish_s1_dac/__init__.py3__all__ = ["DAC", "ModelArgs", "build_ae"]CODE
LOWmlx_audio/codec/models/moss_audio_tokenizer/__init__.py8__all__ = [CODE
LOWmlx_audio/codec/models/higgs_audio/__init__.py11__all__ = [CODE
LOWmlx_audio/codec/models/stepaudio2/__init__.py9__all__ = [CODE
LOWmlx_audio/codec/models/ecapa_tdnn/__init__.py4__all__ = ["EcapaTdnnBackbone", "EcapaTdnnConfig"]CODE
LOWmlx_audio/lid/__init__.py3__all__ = ["load", "load_model"]CODE
LOWmlx_audio/tts/__init__.py3__all__ = ["load", "load_model"]CODE
LOWmlx_audio/tts/models/pocket_tts/conditioners.py10logger = logging.getLogger(__name__)CODE
LOWmlx_audio/tts/models/moss_tts_nano/__init__.py4__all__ = ["GPT2Config", "Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/bark/__init__.py4__all__ = ["Model", "Pipeline", "ModelConfig"]CODE
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py24logger = logging.getLogger(__name__)CODE
LOWmlx_audio/tts/models/chatterbox_turbo/__init__.py11__all__ = [CODE
LOW…x_audio/tts/models/chatterbox_turbo/models/__init__.py7__all__ = [CODE
LOW…models/chatterbox_turbo/models/s3tokenizer/__init__.py19__all__ = [CODE
LOW…udio/tts/models/chatterbox_turbo/models/t3/__init__.py8__all__ = [CODE
LOW…dels/chatterbox_turbo/models/voice_encoder/__init__.py7__all__ = [CODE
LOW…o/tts/models/chatterbox_turbo/models/s3gen/__init__.py17__all__ = [CODE
LOW…_audio/tts/models/chatterbox_turbo/models/s3gen/mel.py12logger = logging.getLogger(__name__)CODE
LOW…udio/tts/models/chatterbox_turbo/models/s3gen/s3gen.py19logger = logging.getLogger(__name__)CODE
LOWmlx_audio/tts/models/kugelaudio/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/kitten_tts/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/vibevoice/__init__.py9__all__ = [CODE
LOWmlx_audio/tts/models/zonos2/convert.py233 def update_largest(key: str, value: mx.array) -> None:CODE
LOWmlx_audio/tts/models/zonos2/__init__.py4__all__ = ["Model", "ModelConfig", "Zonos2Config"]CODE
LOWmlx_audio/tts/models/omnivoice/__init__.py7__all__ = ["Model", "ModelConfig", "OmniVoiceConfig", "create_voice_clone_prompt"]CODE
LOWmlx_audio/tts/models/omnivoice/utils.py8logger = logging.getLogger(__name__)CODE
LOWmlx_audio/tts/models/qwen3/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/higgs_audio/__init__.py14__all__ = [CODE
LOWmlx_audio/tts/models/chatterbox/__init__.py5__all__ = ["Model", "ModelConfig", "convert_from_source"]CODE
LOWmlx_audio/tts/models/chatterbox/tokenizer.py19logger = logging.getLogger(__name__)CODE
LOWmlx_audio/tts/models/chatterbox/s3tokenizer/__init__.py17__all__ = [CODE
LOWmlx_audio/tts/models/chatterbox/t3/__init__.py6__all__ = [CODE
LOW…_audio/tts/models/chatterbox/voice_encoder/__init__.py5__all__ = ["VoiceEncoder", "VoiceEncConfig", "melspectrogram"]CODE
LOWmlx_audio/tts/models/chatterbox/s3gen/__init__.py10__all__ = [CODE
LOW…io/tts/models/chatterbox/s3gen/transformer/__init__.py10__all__ = [CODE
LOW…x_audio/tts/models/chatterbox/s3gen/matcha/__init__.py12__all__ = [CODE
LOWmlx_audio/tts/models/dense/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/confucius4/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/melotts/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/moss_tts_delay/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/higgs_audio_v3/__init__.py12__all__ = [CODE
LOWmlx_audio/tts/models/tada/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/qwen3_tts/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/moss_tts/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/dramabox/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/bailingmm/__init__.py18__all__ = ["Model", "ModelConfig", "convert_campplus_onnx_to_safetensors"]CODE
LOWmlx_audio/tts/models/moss_tts_local/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/sesame/__init__.py3__all__ = ["Model"]CODE
LOWmlx_audio/tts/models/fish_qwen3_omni/__init__.py4__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/kokoro/__init__.py4__all__ = ["KokoroPipeline", "Model", "ModelConfig"]CODE
LOWmlx_audio/tts/models/indextts/__init__.py3__all__ = ["Model", "ModelArgs"]CODE
LOWmlx_audio/tts/models/llama/__init__.py3__all__ = ["Model", "ModelConfig"]CODE
LOWmlx_audio/vad/__init__.py3__all__ = ["load", "load_model"]CODE
LOWmlx_audio/vad/models/silero_vad/__init__.py10__all__ = [CODE
LOWmlx_audio/vad/models/sortformer/__init__.py9__all__ = [CODE
31 more matches not shown…
Self-Referential Comments24 hits · 72 pts
SeverityFileLineSnippetContext
MEDIUMmlx_audio/codec/models/snac/vq.py44 # Create a new tensor with the expanded shapeCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py16# Create a patch for the deprecated open_text functionCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py194 # Create a mock outputCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py388 # Create a mock outputCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py393 # Create a Result instanceCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py535 # Create a minimal configCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py721 # Create a minimal configCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py775 # Create a config with tie_word_embeddings=TrueCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py869 # Create a minimal configCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py1031 # Create a minimal configCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py1146 # Create a config instanceCOMMENT
MEDIUMmlx_audio/tts/tests/test_models.py2347 # Create a simple test audioCOMMENT
MEDIUMmlx_audio/tts/tests/test_base.py13 # Define a test subclassCOMMENT
MEDIUMmlx_audio/tts/tests/test_interpolate.py42 # Create a simple test arrayCOMMENT
MEDIUMmlx_audio/tts/tests/test_interpolate.py63 # Create a simple test arrayCOMMENT
MEDIUMmlx_audio/tts/models/qwen3/qwen3.py142 # Create a mask and filter manually since boolean indexing isn't supportedCOMMENT
MEDIUMmlx_audio/tts/models/dia/dia.py510 # Create a mask for setting tokens beyond 1025 to -infCOMMENT
MEDIUMmlx_audio/tts/models/spark/modules/blocks/sampler.py61 # Create a new tensor with the expanded shapeCOMMENT
MEDIUMmlx_audio/tts/models/llama/llama.py174 # Create a mask and filter manually since boolean indexing isn't supportedCOMMENT
MEDIUMmlx_audio/sts/models/sam_audio/model.py928 # Create the generatorCOMMENT
MEDIUMmlx_audio/sts/models/mossformer2_se/mossformerblock.py74 # Create a list of attention layers using FLASH_ShareA_FFConvMCOMMENT
MEDIUM…dio/sts/models/mossformer2_se/mossformerblock_gfsmn.py65 # Create a list of Gated FSMN blocksCOMMENT
MEDIUM…dio/sts/models/mossformer2_se/mossformerblock_gfsmn.py73 # Create a list of attention layers using FLASH_ShareA_FFConvMCOMMENT
MEDIUMmlx_audio/stt/models/vibevoice_asr/audio_encoder.py68 # Create the convolution layer (no padding in conv, we'll handle it manually)COMMENT
Redundant / Tautological Comments43 hits · 68 pts
SeverityFileLineSnippetContext
LOWmlx_audio/audio_io.py213 # Check if this is a file that needs ffmpegCOMMENT
LOWmlx_audio/base.py21 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_audio/base.py24 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOWmlx_audio/base.py29 # Check if the shape has 3 dimensionsCOMMENT
LOWmlx_audio/base.py32 # Check if out_channels is the largestCOMMENT
LOWmlx_audio/codec/models/s3/model_v2.py364 # Check if any audio exceeds 30 secondsCOMMENT
LOWmlx_audio/tests/test_audio_io.py13# Check if ffmpeg is available for optional testsCOMMENT
LOWmlx_audio/tts/models/base.py24 # Check if the shape has 4 dimensionsCOMMENT
LOWmlx_audio/tts/models/base.py30 # Check if out_channels is the largest, and kH and KW are the sameCOMMENT
LOW…_audio/tts/models/chatterbox_turbo/chatterbox_turbo.py121 # Check if first argument is a config dict (from load_model)COMMENT
LOWmlx_audio/tts/models/kugelaudio/kugelaudio.py428 # Check if target key existsCOMMENT
LOWmlx_audio/tts/models/kitten_tts/istftnet.py162 # Check if channels last match or if groups > 1 for ConvTransposed1dCOMMENT
LOWmlx_audio/tts/models/kitten_tts/istftnet.py990 # Check if this block has upsamplingCOMMENT
LOWmlx_audio/tts/models/vibevoice/vibevoice.py263 # Check if key exists in modelCOMMENT
LOWmlx_audio/tts/models/vibevoice/vibevoice.py279 # Check if it's a transposed conv weightCOMMENT
LOWmlx_audio/tts/models/qwen3/qwen3.py128 # Check if we found any tokens BEFORE converting to MLX arrayCOMMENT
LOWmlx_audio/tts/models/chatterbox/chatterbox.py161 # Check if first argument is a configCOMMENT
LOWmlx_audio/tts/models/chatterbox/chatterbox.py419 # Check if we have quantized weights (scales) for this pathCOMMENT
LOWmlx_audio/tts/models/chatterbox/chatterbox.py480 # Check if multilingual model from config.jsonCOMMENT
LOWmlx_audio/tts/models/chatterbox/chatterbox.py526 # Check if multilingual model from config..jsonCOMMENT
LOWmlx_audio/tts/models/chatterbox/t3/t3.py93 # Check if already converted (idempotent)COMMENT
LOWmlx_audio/tts/models/chatterbox/s3gen/s3gen.py407 # Check if this is ConvTranspose (ups) or regular ConvCOMMENT
LOW…udio/tts/models/chatterbox/s3gen/matcha/transformer.py65 # Check if it's additive bias (contains large negative values)COMMENT
LOWmlx_audio/tts/models/outetts/audio_processor.py158 if audio.size == 0: # Check if array is emptyCODE
LOWmlx_audio/tts/models/qwen3_tts/qwen3_tts.py1241 # Check if we should use ICL modeCOMMENT
LOWmlx_audio/tts/models/kokoro/istftnet.py160 # Check if channels last match or if groups > 1 for ConvTransposed1dCOMMENT
LOWmlx_audio/tts/models/kokoro/istftnet.py969 # Check if this block has upsamplingCOMMENT
LOWmlx_audio/tts/models/kokoro/pipeline.py177 # Check if voice exists in local snapshot firstCOMMENT
LOWmlx_audio/tts/models/spark/utils/file.py61 # Open the file for readingCOMMENT
LOWmlx_audio/tts/models/spark/utils/file.py116 # Check if there is a base configuration specified and merge if necessaryCOMMENT
LOWmlx_audio/tts/models/spark/utils/file.py169 # Set headers to keys from the first dictionary in data if not explicitly providedCOMMENT
LOWmlx_audio/tts/models/spark/modules/residual.py130 # Check if indices are emptyCOMMENT
LOWmlx_audio/tts/models/voxcpm/audio_vae.py538 # Check if this is a 3D weight that needs transposition by comparing with model shapeCOMMENT
LOWmlx_audio/sts/models/sam_audio/processor.py33 # Check if file exists firstCOMMENT
LOWmlx_audio/sts/models/sam_audio/model.py507 ] = None, # Set it to 50 for better performanceCODE
LOWmlx_audio/sts/models/deepfilternet/network.py310 # Check if separable (has pointwise conv at index '2')COMMENT
LOW…udio/sts/models/mossformer2_se/flash_sharea_ffconvm.py230 # Check if it's mlx.nn.RoPE or custom implementationCOMMENT
LOWmlx_audio/sts/models/mossformer2_se/model.py235 # Check if segmented processing is neededCOMMENT
LOWmlx_audio/sts/models/mossformer2_se/mossformerm.py92 # Set MossFormerBlock to eval modeCOMMENT
LOWmlx_audio/sts/models/mossformer2_se/mossformerm.py99 # Set MossFormerBlock to train modeCOMMENT
LOWmlx_audio/stt/models/qwen3_asr/config.py100 # Check if this is a forced aligner configCOMMENT
LOWmlx_audio/stt/models/whisper/whisper.py291 # Check if this is HuggingFace format (has d_model or encoder_layers)COMMENT
LOWmlx_audio/stt/models/whisper/whisper.py576 # Check if this is HuggingFace format (has 'model.' prefix)COMMENT
Structural Annotation Overuse31 hits · 62 pts
SeverityFileLineSnippetContext
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py194 # Step 1: Remove DC offset per frame (before preemphasis)COMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py198 # Step 2: Apply preemphasis PER FRAME (Kaldi applies it after framing)COMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py209 # Step 3: Apply windowCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py212 # Step 4: Pad to FFT lengthCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py216 # Step 5: Compute FFT and get magnitude/power spectrumCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py222 # Step 6: Apply mel filterbankCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py225 # Step 7: Apply log with epsilon floorCOMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py587 # Step 1: STFT → real/imag [B, 2, freq_bins, T]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py593 # Step 2: CaC interleave — [B, 2, freq_bins, T] → [B, freq_bins*2, T]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py600 # Step 3: BandSplit → [B, T, num_bands, dim]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py605 # Step 4: 6× dual-axis transformerCOMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py617 # Step 5: Mask estimation → list of [B, T, band_dim]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py620 # Step 6: Merge masks → [B, freq_bins*2, T, 2]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py623 # Step 7: Complex multiply (input × mask)COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py632 # Step 8: De-interleave → [B, 2, freq_bins, T]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py636 # Step 9: iSTFT → [B, 2, samples]COMMENT
LOW…o/sts/models/mossformer2_se/flash_attention_kernels.py113 # Step 1: Q @ K^T scaledCOMMENT
LOW…o/sts/models/mossformer2_se/flash_attention_kernels.py116 # Step 2: Apply fused ReLU² kernelCOMMENT
LOW…o/sts/models/mossformer2_se/flash_attention_kernels.py131 # Step 3: Attention @ VCOMMENT
LOWmlx_audio/stt/models/qwen3_asr/qwen3_asr.py975 # Step 1: Encode audio featuresCOMMENT
LOWmlx_audio/stt/models/qwen3_asr/qwen3_asr.py989 # Step 2: Build input embeddings with audio mergedCOMMENT
LOWdocs/contributing/adding-a-model.md28## Step 1: Create the Model PackageCOMMENT
LOWdocs/contributing/adding-a-model.md39## Step 2: Implement the ModelCOMMENT
LOWdocs/contributing/adding-a-model.md128## Step 3: Register the ModelCOMMENT
LOWdocs/contributing/adding-a-model.md165## Step 4: Convert and TestCOMMENT
LOWdocs/contributing/adding-a-model.md210## Step 5: Add DocumentationCOMMENT
LOWdocs/models/tts/omnivoice.md45# Step 1: Preprocess reference audio (silence removal, RMS norm)COMMENT
LOWdocs/models/tts/omnivoice.md49# Step 2: Decode preprocessed tokens back to audio, then transcribeCOMMENT
LOWdocs/models/tts/omnivoice.md59# Step 3: Generate with ref_tokens + ref_text from the same sourceCOMMENT
LOWexamples/qwen3_asr_transcription.py55 # Step 1: Transcribe audio with Qwen3-ASRCOMMENT
LOWexamples/qwen3_asr_transcription.py90 # Step 2: Run forced alignment with Qwen3-ForcedAlignerCOMMENT
Verbosity Indicators23 hits · 48 pts
SeverityFileLineSnippetContext
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py194 # Step 1: Remove DC offset per frame (before preemphasis)COMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py198 # Step 2: Apply preemphasis PER FRAME (Kaldi applies it after framing)COMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py209 # Step 3: Apply windowCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py212 # Step 4: Pad to FFT lengthCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py216 # Step 5: Compute FFT and get magnitude/power spectrumCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py222 # Step 6: Apply mel filterbankCOMMENT
LOW…io/tts/models/chatterbox_turbo/models/s3gen/xvector.py225 # Step 7: Apply log with epsilon floorCOMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py587 # Step 1: STFT → real/imag [B, 2, freq_bins, T]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py593 # Step 2: CaC interleave — [B, 2, freq_bins, T] → [B, freq_bins*2, T]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py600 # Step 3: BandSplit → [B, T, num_bands, dim]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py605 # Step 4: 6× dual-axis transformerCOMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py617 # Step 5: Mask estimation → list of [B, T, band_dim]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py620 # Step 6: Merge masks → [B, freq_bins*2, T, 2]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py623 # Step 7: Complex multiply (input × mask)COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py632 # Step 8: De-interleave → [B, 2, freq_bins, T]COMMENT
LOWmlx_audio/sts/models/mel_roformer/model.py636 # Step 9: iSTFT → [B, 2, samples]COMMENT
LOW…o/sts/models/mossformer2_se/flash_attention_kernels.py113 # Step 1: Q @ K^T scaledCOMMENT
LOW…o/sts/models/mossformer2_se/flash_attention_kernels.py116 # Step 2: Apply fused ReLU² kernelCOMMENT
LOW…o/sts/models/mossformer2_se/flash_attention_kernels.py131 # Step 3: Attention @ VCOMMENT
LOWmlx_audio/stt/models/qwen3_asr/qwen3_asr.py975 # Step 1: Encode audio featuresCOMMENT
LOWmlx_audio/stt/models/qwen3_asr/qwen3_asr.py989 # Step 2: Build input embeddings with audio mergedCOMMENT
LOWexamples/qwen3_asr_transcription.py55 # Step 1: Transcribe audio with Qwen3-ASRCOMMENT
LOWexamples/qwen3_asr_transcription.py90 # Step 2: Run forced alignment with Qwen3-ForcedAlignerCOMMENT
Cross-Language Confusion6 hits · 35 pts
SeverityFileLineSnippetContext
HIGHmlx_audio/server.py1814 # Manual-commit mode (turn_detection: null): no VAD, soCOMMENT
HIGHmlx_audio/realtime_vad.py187 events.extend(self._detector.push(prob, VAD_FRAME_MS))CODE
HIGHmlx_audio/tests/test_realtime_vad.py73 events.extend(detector.push(p, frame_ms))CODE
HIGHmlx_audio/sts/voice_pipeline.py234 for chunk in self.chunker.push(samples):CODE
HIGH…o/sts/models/mossformer2_se/depthwise_conv1d_kernel.py31 if (batch >= B || time >= L_out || chan >= C) {CODE
HIGH…o/sts/models/mossformer2_se/depthwise_conv1d_kernel.py41 if (in_time >= 0 && in_time < L_in) {CODE
Cross-File Repetition7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHmlx_audio/lid/utils.py0load and initialize an stt model from a given path. args: model_path: the path or huggingface repo to load the model froSTRING
HIGHmlx_audio/vad/utils.py0load and initialize an stt model from a given path. args: model_path: the path or huggingface repo to load the model froSTRING
HIGHmlx_audio/stt/utils.py0load and initialize an stt model from a given path. args: model_path: the path or huggingface repo to load the model froSTRING
HIGHmlx_audio/tts/models/qwen3/qwen3.py0hook called after model weights are loaded. used to initialize the tokenizer which is required for text input.STRING
HIGHmlx_audio/tts/models/spark/spark.py0hook called after model weights are loaded. used to initialize the tokenizer which is required for text input.STRING
HIGHmlx_audio/tts/models/voxcpm/voxcpm.py0hook called after model weights are loaded. used to initialize the tokenizer which is required for text input.STRING
HIGHmlx_audio/stt/models/glmasr/glmasr.py0hook called after model weights are loaded. used to initialize the tokenizer which is required for text input.STRING
Modern AI Meta-Vocabulary7 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUMmlx_audio/tts/tests/test_models.py7652 # Simulate zero-shot inputCOMMENT
MEDIUMmlx_audio/tts/models/voxcpm2/voxcpm2.py616 # In zero-shot/ref modes, warmup patches are generated for conditioningCOMMENT
MEDIUMmlx_audio/tts/models/tada/tada.py1334 # For zero-shot: skip structural prefix featuresCOMMENT
MEDIUMmlx_audio/stt/models/whisper/whisper.py1173 # skip silence before possible hallucinationsCOMMENT
MEDIUMmlx_audio/stt/models/whisper/whisper.py1188 # if first segment might be a hallucination, skip leading silenceCOMMENT
MEDIUMmlx_audio/stt/models/whisper/whisper.py1200 # skip silence before any possible hallucination that is surroundedCOMMENT
MEDIUMmlx_audio/stt/models/whisper/whisper.py1201 # by silence or more hallucinationsCOMMENT
Over-Commented Block17 hits · 17 pts
SeverityFileLineSnippetContext
LOW…udio/tts/models/chatterbox_turbo/models/s3gen/s3gen.py441COMMENT
LOWmlx_audio/tts/models/omnivoice/duration.py1#!/usr/bin/env python3COMMENT
LOWmlx_audio/tts/models/chatterbox/s3gen/s3gen.py361 )COMMENT
LOWmlx_audio/tts/models/spark/utils/audio.py1# Copyright (c) 2025 SparkAudioCOMMENT
LOW…/tts/models/spark/modules/speaker/perceiver_encoder.py1# Copyright (c) 2025 SparkAudioCOMMENT
LOW…x_audio/tts/models/spark/modules/speaker/ecapa_tdnn.py1# Copyright (c) 2021 Zhengyang Chen (chenzhengyang117@gmail.com)COMMENT
LOW…x_audio/tts/models/spark/modules/speaker/ecapa_tdnn.py281 # x_np = torch.randn(1, 200, 80)COMMENT
LOW…dio/tts/models/spark/modules/speaker/pooling_layers.py1# Copyright (c) 2021 Shuai Wang (wsstriving@gmail.com)COMMENT
LOW…io/tts/models/spark/modules/speaker/speaker_encoder.py1# Copyright (c) 2025 SparkAudioCOMMENT
LOW…s/models/spark/modules/encoder_decoder/feat_decoder.py1# Copyright (c) 2025 SparkAudioCOMMENT
LOW…s/models/spark/modules/encoder_decoder/feat_encoder.py1# Copyright (c) 2025 SparkAudioCOMMENT
LOWmlx_audio/vad/models/sortformer/convert.py41#COMMENT
LOWmlx_audio/vad/models/fsmn/convert.py41 # 2. 去掉多余的 ".linear" (in_linear1.linear.weight → in_linear1.weight)COMMENT
LOWmlx_audio/sts/models/sam_audio/model.py1301 )COMMENT
LOW…udio/sts/models/mossformer2_se/flash_sharea_ffconvm.py341 # Compute k^T @ v: (batch, query_key_dim, value_dim)COMMENT
LOWmlx_audio/stt/models/vibevoice_asr/vibevoice_asr.py221 # Create padded speech features matching text_embeds shapeCOMMENT
LOW…_audio/stt/models/voxtral_realtime/voxtral_realtime.py581 # Precompute mel filtersCOMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHmlx_audio/tts/models/sesame/sesame.py672 # This applies an imperceptible watermark to identify audio as AI-generated.COMMENT
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHmlx_audio/tts/models/voxcpm/audio_vae.py228 # I'll implement it just in case.COMMENT
Fake / Example Data2 hits · 1 pts
SeverityFileLineSnippetContext
LOWmlx_audio/tts/models/voxcpm2/README.md88 --ref_text "placeholder" \CODE
LOWmlx_audio/tts/models/kitten_tts/preprocess.py669 "555-1234" → "five five five one two three four"STRING