Repository Analysis

SWivid/F5-TTS

Official code for "F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching"

8.9 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of SWivid/F5-TTS, a Python project with 14,945 GitHub stars. SynthScan v2.0 examined 21,017 lines of code across 81 source files, recording 149 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 8.9 places this repository in the Low 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).

8.9
Adjusted Score
8.9
Raw Score
100%
Time Factor
2026-07-05
Last Push
14.9K
Stars
Python
Language
21.0K
Lines of Code
81
Files
149
Pattern Hits
2026-07-14
Scan Date
0.07
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 6MEDIUM 11LOW 132

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 149 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.

Unused Imports37 hits · 34 pts
SeverityFileLineSnippetContext
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py24CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py25CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py26CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py27CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py30CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py38CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py39CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py40CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py42CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py43CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py44CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py45CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py46CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py48CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py49CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py51CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py54CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py54CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py54CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py55CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py57CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py58CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py59CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/f5tts/model.py1CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/f5tts/modules.py1CODE
LOWsrc/f5_tts/model/cfm.py11CODE
LOWsrc/f5_tts/model/__init__.py1CODE
LOWsrc/f5_tts/model/__init__.py2CODE
LOWsrc/f5_tts/model/__init__.py3CODE
LOWsrc/f5_tts/model/__init__.py4CODE
LOWsrc/f5_tts/model/__init__.py5CODE
LOWsrc/f5_tts/model/utils.py3CODE
LOWsrc/f5_tts/model/modules.py11CODE
LOWsrc/f5_tts/model/trainer.py1CODE
LOWsrc/f5_tts/model/backbones/mmdit.py11CODE
LOWsrc/f5_tts/model/backbones/unett.py11CODE
LOWsrc/f5_tts/model/backbones/dit.py11CODE
Deep Nesting27 hits · 27 pts
SeverityFileLineSnippetContext
LOWsrc/f5_tts/socket_server.py180CODE
LOWsrc/f5_tts/socket_server.py43CODE
LOWsrc/f5_tts/runtime/triton_trtllm/benchmark.py275CODE
LOW…time/triton_trtllm/model_repo_f5_tts/f5_tts/1/model.py57CODE
LOW…ts/runtime/triton_trtllm/scripts/convert_checkpoint.py26CODE
LOW…ts/runtime/triton_trtllm/scripts/convert_checkpoint.py113CODE
LOW…ts/runtime/triton_trtllm/scripts/convert_checkpoint.py253CODE
LOWsrc/f5_tts/model/utils.py112CODE
LOWsrc/f5_tts/model/utils.py148CODE
LOWsrc/f5_tts/model/trainer.py150CODE
LOWsrc/f5_tts/model/trainer.py265CODE
LOWsrc/f5_tts/model/backbones/unett.py244CODE
LOWsrc/f5_tts/train/finetune_gradio.py342CODE
LOWsrc/f5_tts/train/finetune_gradio.py714CODE
LOWsrc/f5_tts/train/finetune_gradio.py226CODE
LOWsrc/f5_tts/train/finetune_cli.py81CODE
LOWsrc/f5_tts/train/datasets/prepare_emilia_v2.py21CODE
LOWsrc/f5_tts/train/datasets/prepare_csv_wavs.py106CODE
LOWsrc/f5_tts/train/datasets/prepare_emilia.py111CODE
LOWsrc/f5_tts/infer/utils_infer.py298CODE
LOWsrc/f5_tts/infer/utils_infer.py440CODE
LOWsrc/f5_tts/infer/infer_gradio.py133CODE
LOWsrc/f5_tts/eval/ecapa_tdnn.py165CODE
LOWsrc/f5_tts/eval/eval_seedtts_testset.py48CODE
LOWsrc/f5_tts/eval/eval_librispeech_test_clean.py49CODE
LOWsrc/f5_tts/eval/eval_infer_batch.py39CODE
LOWsrc/f5_tts/eval/utils_eval.py306CODE
Cross-File Repetition5 hits · 25 pts
SeverityFileLineSnippetContext
HIGHsrc/f5_tts/model/cfm.py0ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimensionSTRING
HIGHsrc/f5_tts/model/modules.py0ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimensionSTRING
HIGHsrc/f5_tts/model/backbones/mmdit.py0ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimensionSTRING
HIGHsrc/f5_tts/model/backbones/unett.py0ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimensionSTRING
HIGHsrc/f5_tts/model/backbones/dit.py0ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimensionSTRING
Excessive Try-Catch Wrapping17 hits · 21 pts
SeverityFileLineSnippetContext
LOWsrc/f5_tts/socket_client.py53 except Exception as e:CODE
LOWsrc/f5_tts/socket_server.py194 except Exception as inner_e:CODE
LOWsrc/f5_tts/socket_server.py198 except Exception as e:CODE
MEDIUMsrc/f5_tts/socket_server.py180def handle_client(conn, processor):CODE
LOW…ts/runtime/triton_trtllm/scripts/convert_checkpoint.py264 except Exception as e:CODE
LOWsrc/f5_tts/model/utils.py46 except Exception:CODE
LOWsrc/f5_tts/train/finetune_gradio.py489 except Exception as e:CODE
LOWsrc/f5_tts/train/finetune_gradio.py591 except Exception as e: # Catch all exceptionsCODE
LOWsrc/f5_tts/train/finetune_gradio.py782 except Exception as e:CODE
MEDIUMsrc/f5_tts/train/finetune_gradio.py784 print(f"Error processing {file_audio}: {e}")CODE
LOWsrc/f5_tts/train/finetune_gradio.py970 except Exception as e:CODE
MEDIUMsrc/f5_tts/train/finetune_gradio.py314def terminate_process_tree(pid, including_parent=True):CODE
LOWsrc/f5_tts/train/datasets/prepare_csv_wavs.py87 except Exception as e:CODE
LOWsrc/f5_tts/train/datasets/prepare_csv_wavs.py145 except Exception as e:CODE
MEDIUMsrc/f5_tts/train/datasets/prepare_csv_wavs.py146 print(f"Error processing file: {e}")CODE
LOWsrc/f5_tts/train/datasets/prepare_csv_wavs.py176 except Exception as e:CODE
LOWsrc/f5_tts/train/datasets/prepare_csv_wavs.py205 except Exception as e:CODE
AI Structural Patterns21 hits · 21 pts
SeverityFileLineSnippetContext
LOWsrc/f5_tts/api.py24CODE
LOWsrc/f5_tts/api.py98CODE
LOWsrc/f5_tts/runtime/triton_trtllm/client_http.py106CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/f5tts/modules.py276CODE
LOWsrc/f5_tts/model/cfm.py35CODE
LOWsrc/f5_tts/model/cfm.py84CODE
LOWsrc/f5_tts/model/dataset.py83CODE
LOWsrc/f5_tts/model/modules.py35CODE
LOWsrc/f5_tts/model/trainer.py27CODE
LOWsrc/f5_tts/model/backbones/mmdit.py88CODE
LOWsrc/f5_tts/model/backbones/mmdit.py262CODE
LOWsrc/f5_tts/model/backbones/unett.py109CODE
LOWsrc/f5_tts/model/backbones/dit.py171CODE
LOWsrc/f5_tts/model/backbones/dit.py370CODE
LOWsrc/f5_tts/infer/utils_infer.py384CODE
LOWsrc/f5_tts/infer/utils_infer.py440CODE
LOWsrc/f5_tts/eval/ecapa_tdnn.py53CODE
LOWsrc/f5_tts/eval/ecapa_tdnn.py86CODE
LOWsrc/f5_tts/eval/ecapa_tdnn.py165CODE
LOWsrc/f5_tts/eval/ecapa_tdnn.py310CODE
LOWsrc/f5_tts/eval/utils_eval.py72CODE
Hyper-Verbose Identifiers15 hits · 15 pts
SeverityFileLineSnippetContext
LOW…time/triton_trtllm/model_repo_f5_tts/f5_tts/1/model.py155 def get_vocos_mel_spectrogram(self, waveform):CODE
LOW…ts/runtime/triton_trtllm/scripts/convert_checkpoint.py113def convert_pytorch_dit_to_trtllm_weight(args, mapping, dtype="float32", use_ema=True):CODE
LOWsrc/f5_tts/model/utils.py61def mask_from_start_end_indices(seq_len: int["b"], start: int["b"], end: int["b"]):CODE
LOWsrc/f5_tts/model/modules.py35def get_bigvgan_mel_spectrogram(CODE
LOWsrc/f5_tts/model/modules.py80def get_vocos_mel_spectrogram(CODE
LOWsrc/f5_tts/model/backbones/dit.py55 def average_upsample_text_by_mask(self, text, text_mask, target_lens):CODE
LOWsrc/f5_tts/train/finetune_gradio.py1128def get_random_sample_prepare(project_name):CODE
LOWsrc/f5_tts/train/finetune_gradio.py1141def get_random_sample_transcribe(project_name):CODE
LOWsrc/f5_tts/infer/utils_infer.py298def preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=print):CODE
LOWsrc/f5_tts/infer/utils_infer.py528 def infer_single_process_streaming(gen_text):CODE
LOWsrc/f5_tts/infer/utils_infer.py599def remove_silence_for_generated_wav(filename):CODE
LOWsrc/f5_tts/infer/infer_gradio.py541 def make_insert_speech_type_fn(index):CODE
LOWsrc/f5_tts/infer/infer_gradio.py611 def generate_multistyle_speech(CODE
LOWsrc/f5_tts/eval/utils_eval.py18def get_seedtts_testset_metainfo(metalst):CODE
LOWsrc/f5_tts/eval/utils_eval.py36def get_librispeech_test_clean_metainfo(metalst, librispeech_test_clean_path):CODE
Over-Commented Block12 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/f5_tts/runtime/triton_trtllm/benchmark.py1# Copyright (c) 2024 Tsinghua Univ. (authors: Xingchen Song)COMMENT
LOWsrc/f5_tts/runtime/triton_trtllm/client_http.py1# Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.COMMENT
LOWsrc/f5_tts/runtime/triton_trtllm/client_grpc.py1#!/usr/bin/env python3COMMENT
LOW…time/triton_trtllm/model_repo_f5_tts/f5_tts/1/model.py1# Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.COMMENT
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py1# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.COMMENT
LOW…untime/triton_trtllm/scripts/export_vocoder_to_onnx.py1# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.COMMENT
LOW…_tts/runtime/triton_trtllm/scripts/export_vocos_trt.sh1#!/bin/bashCOMMENT
LOWsrc/f5_tts/runtime/triton_trtllm/scripts/conv_stft.py1# Modified from https://github.com/echocatzh/conv-stft/blob/master/conv_stft/conv_stft.pyCOMMENT
LOWsrc/f5_tts/runtime/triton_trtllm/scripts/conv_stft.py21# Permission is hereby granted, free of charge, to any person obtaining a copyCOMMENT
LOWsrc/f5_tts/train/datasets/prepare_wenetspeech4tts.py121 # pinyin vocab size 1349 1348 1344 (no polyphone)COMMENT
LOWsrc/f5_tts/train/datasets/prepare_emilia.py221 # Emilia ZH & ENCOMMENT
LOWsrc/f5_tts/infer/speech_edit.py81fix_duration = [COMMENT
Decorative Section Separators4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMsrc/f5_tts/infer/utils_infer.py50# -----------------------------------------COMMENT
MEDIUMsrc/f5_tts/infer/utils_infer.py67# -----------------------------------------COMMENT
MEDIUMsrc/f5_tts/eval/eval_seedtts_testset.py70 # --------------------------------------------------------------------------COMMENT
MEDIUMsrc/f5_tts/eval/eval_librispeech_test_clean.py71 # --------------------------------------------------------------------------COMMENT
Modern Structural Boilerplate5 hits · 5 pts
SeverityFileLineSnippetContext
LOWsrc/f5_tts/socket_client.py11logger = logging.getLogger(__name__)CODE
LOWsrc/f5_tts/socket_server.py29logger = logging.getLogger(__name__)CODE
LOWsrc/f5_tts/runtime/triton_trtllm/patch/__init__.py65__all__ = [CODE
LOWsrc/f5_tts/model/__init__.py8__all__ = ["CFM", "UNetT", "DiT", "MMDiT", "Trainer"]CODE
LOWsrc/f5_tts/model/dataset.py224 def set_epoch(self, epoch: int) -> None:CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/f5_tts/train/finetune_gradio.py390 # Check if a training process is already runningCOMMENT
LOWsrc/f5_tts/infer/infer_gradio.py722 # Check if all speech types in text are availableCOMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/f5_tts/train/datasets/prepare_emilia.py2# if use updated new version, i.e. WebDataset, feel free to modify / draft your own scriptCOMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/f5_tts/infer/utils_infer.py587 # Create a combined spectrogramCOMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/f5_tts/infer/speech_edit.py66# [leverage https://github.com/MahmoudAshraf97/ctc-forced-aligner to get char level alignment]COMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHsrc/f5_tts/runtime/triton_trtllm/benchmark.py26--tllm-model-dir $TRTLLM_ENGINE_DIR || exit 1STRING