Official code for "F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching"
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).
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.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 24 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 25 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 26 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 27 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 30 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 38 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 39 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 40 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 42 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 43 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 44 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 45 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 46 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 48 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 49 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 51 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 54 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 54 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 54 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 55 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 57 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 58 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 59 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/f5tts/model.py | 1 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/f5tts/modules.py | 1 | CODE | |
| LOW | src/f5_tts/model/cfm.py | 11 | CODE | |
| LOW | src/f5_tts/model/__init__.py | 1 | CODE | |
| LOW | src/f5_tts/model/__init__.py | 2 | CODE | |
| LOW | src/f5_tts/model/__init__.py | 3 | CODE | |
| LOW | src/f5_tts/model/__init__.py | 4 | CODE | |
| LOW | src/f5_tts/model/__init__.py | 5 | CODE | |
| LOW | src/f5_tts/model/utils.py | 3 | CODE | |
| LOW | src/f5_tts/model/modules.py | 11 | CODE | |
| LOW | src/f5_tts/model/trainer.py | 1 | CODE | |
| LOW | src/f5_tts/model/backbones/mmdit.py | 11 | CODE | |
| LOW | src/f5_tts/model/backbones/unett.py | 11 | CODE | |
| LOW | src/f5_tts/model/backbones/dit.py | 11 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/f5_tts/socket_server.py | 180 | CODE | |
| LOW | src/f5_tts/socket_server.py | 43 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/benchmark.py | 275 | CODE | |
| LOW | …time/triton_trtllm/model_repo_f5_tts/f5_tts/1/model.py | 57 | CODE | |
| LOW | …ts/runtime/triton_trtllm/scripts/convert_checkpoint.py | 26 | CODE | |
| LOW | …ts/runtime/triton_trtllm/scripts/convert_checkpoint.py | 113 | CODE | |
| LOW | …ts/runtime/triton_trtllm/scripts/convert_checkpoint.py | 253 | CODE | |
| LOW | src/f5_tts/model/utils.py | 112 | CODE | |
| LOW | src/f5_tts/model/utils.py | 148 | CODE | |
| LOW | src/f5_tts/model/trainer.py | 150 | CODE | |
| LOW | src/f5_tts/model/trainer.py | 265 | CODE | |
| LOW | src/f5_tts/model/backbones/unett.py | 244 | CODE | |
| LOW | src/f5_tts/train/finetune_gradio.py | 342 | CODE | |
| LOW | src/f5_tts/train/finetune_gradio.py | 714 | CODE | |
| LOW | src/f5_tts/train/finetune_gradio.py | 226 | CODE | |
| LOW | src/f5_tts/train/finetune_cli.py | 81 | CODE | |
| LOW | src/f5_tts/train/datasets/prepare_emilia_v2.py | 21 | CODE | |
| LOW | src/f5_tts/train/datasets/prepare_csv_wavs.py | 106 | CODE | |
| LOW | src/f5_tts/train/datasets/prepare_emilia.py | 111 | CODE | |
| LOW | src/f5_tts/infer/utils_infer.py | 298 | CODE | |
| LOW | src/f5_tts/infer/utils_infer.py | 440 | CODE | |
| LOW | src/f5_tts/infer/infer_gradio.py | 133 | CODE | |
| LOW | src/f5_tts/eval/ecapa_tdnn.py | 165 | CODE | |
| LOW | src/f5_tts/eval/eval_seedtts_testset.py | 48 | CODE | |
| LOW | src/f5_tts/eval/eval_librispeech_test_clean.py | 49 | CODE | |
| LOW | src/f5_tts/eval/eval_infer_batch.py | 39 | CODE | |
| LOW | src/f5_tts/eval/utils_eval.py | 306 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/f5_tts/model/cfm.py | 0 | ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimension | STRING |
| HIGH | src/f5_tts/model/modules.py | 0 | ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimension | STRING |
| HIGH | src/f5_tts/model/backbones/mmdit.py | 0 | ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimension | STRING |
| HIGH | src/f5_tts/model/backbones/unett.py | 0 | ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimension | STRING |
| HIGH | src/f5_tts/model/backbones/dit.py | 0 | ein notation: b - batch n - sequence nt - text sequence nw - raw wave length d - dimension | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/f5_tts/socket_client.py | 53 | except Exception as e: | CODE |
| LOW | src/f5_tts/socket_server.py | 194 | except Exception as inner_e: | CODE |
| LOW | src/f5_tts/socket_server.py | 198 | except Exception as e: | CODE |
| MEDIUM | src/f5_tts/socket_server.py | 180 | def handle_client(conn, processor): | CODE |
| LOW | …ts/runtime/triton_trtllm/scripts/convert_checkpoint.py | 264 | except Exception as e: | CODE |
| LOW | src/f5_tts/model/utils.py | 46 | except Exception: | CODE |
| LOW | src/f5_tts/train/finetune_gradio.py | 489 | except Exception as e: | CODE |
| LOW | src/f5_tts/train/finetune_gradio.py | 591 | except Exception as e: # Catch all exceptions | CODE |
| LOW | src/f5_tts/train/finetune_gradio.py | 782 | except Exception as e: | CODE |
| MEDIUM | src/f5_tts/train/finetune_gradio.py | 784 | print(f"Error processing {file_audio}: {e}") | CODE |
| LOW | src/f5_tts/train/finetune_gradio.py | 970 | except Exception as e: | CODE |
| MEDIUM | src/f5_tts/train/finetune_gradio.py | 314 | def terminate_process_tree(pid, including_parent=True): | CODE |
| LOW | src/f5_tts/train/datasets/prepare_csv_wavs.py | 87 | except Exception as e: | CODE |
| LOW | src/f5_tts/train/datasets/prepare_csv_wavs.py | 145 | except Exception as e: | CODE |
| MEDIUM | src/f5_tts/train/datasets/prepare_csv_wavs.py | 146 | print(f"Error processing file: {e}") | CODE |
| LOW | src/f5_tts/train/datasets/prepare_csv_wavs.py | 176 | except Exception as e: | CODE |
| LOW | src/f5_tts/train/datasets/prepare_csv_wavs.py | 205 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/f5_tts/api.py | 24 | CODE | |
| LOW | src/f5_tts/api.py | 98 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/client_http.py | 106 | CODE | |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/f5tts/modules.py | 276 | CODE | |
| LOW | src/f5_tts/model/cfm.py | 35 | CODE | |
| LOW | src/f5_tts/model/cfm.py | 84 | CODE | |
| LOW | src/f5_tts/model/dataset.py | 83 | CODE | |
| LOW | src/f5_tts/model/modules.py | 35 | CODE | |
| LOW | src/f5_tts/model/trainer.py | 27 | CODE | |
| LOW | src/f5_tts/model/backbones/mmdit.py | 88 | CODE | |
| LOW | src/f5_tts/model/backbones/mmdit.py | 262 | CODE | |
| LOW | src/f5_tts/model/backbones/unett.py | 109 | CODE | |
| LOW | src/f5_tts/model/backbones/dit.py | 171 | CODE | |
| LOW | src/f5_tts/model/backbones/dit.py | 370 | CODE | |
| LOW | src/f5_tts/infer/utils_infer.py | 384 | CODE | |
| LOW | src/f5_tts/infer/utils_infer.py | 440 | CODE | |
| LOW | src/f5_tts/eval/ecapa_tdnn.py | 53 | CODE | |
| LOW | src/f5_tts/eval/ecapa_tdnn.py | 86 | CODE | |
| LOW | src/f5_tts/eval/ecapa_tdnn.py | 165 | CODE | |
| LOW | src/f5_tts/eval/ecapa_tdnn.py | 310 | CODE | |
| LOW | src/f5_tts/eval/utils_eval.py | 72 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …time/triton_trtllm/model_repo_f5_tts/f5_tts/1/model.py | 155 | def get_vocos_mel_spectrogram(self, waveform): | CODE |
| LOW | …ts/runtime/triton_trtllm/scripts/convert_checkpoint.py | 113 | def convert_pytorch_dit_to_trtllm_weight(args, mapping, dtype="float32", use_ema=True): | CODE |
| LOW | src/f5_tts/model/utils.py | 61 | def mask_from_start_end_indices(seq_len: int["b"], start: int["b"], end: int["b"]): | CODE |
| LOW | src/f5_tts/model/modules.py | 35 | def get_bigvgan_mel_spectrogram( | CODE |
| LOW | src/f5_tts/model/modules.py | 80 | def get_vocos_mel_spectrogram( | CODE |
| LOW | src/f5_tts/model/backbones/dit.py | 55 | def average_upsample_text_by_mask(self, text, text_mask, target_lens): | CODE |
| LOW | src/f5_tts/train/finetune_gradio.py | 1128 | def get_random_sample_prepare(project_name): | CODE |
| LOW | src/f5_tts/train/finetune_gradio.py | 1141 | def get_random_sample_transcribe(project_name): | CODE |
| LOW | src/f5_tts/infer/utils_infer.py | 298 | def preprocess_ref_audio_text(ref_audio_orig, ref_text, show_info=print): | CODE |
| LOW | src/f5_tts/infer/utils_infer.py | 528 | def infer_single_process_streaming(gen_text): | CODE |
| LOW | src/f5_tts/infer/utils_infer.py | 599 | def remove_silence_for_generated_wav(filename): | CODE |
| LOW | src/f5_tts/infer/infer_gradio.py | 541 | def make_insert_speech_type_fn(index): | CODE |
| LOW | src/f5_tts/infer/infer_gradio.py | 611 | def generate_multistyle_speech( | CODE |
| LOW | src/f5_tts/eval/utils_eval.py | 18 | def get_seedtts_testset_metainfo(metalst): | CODE |
| LOW | src/f5_tts/eval/utils_eval.py | 36 | def get_librispeech_test_clean_metainfo(metalst, librispeech_test_clean_path): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/f5_tts/runtime/triton_trtllm/benchmark.py | 1 | # Copyright (c) 2024 Tsinghua Univ. (authors: Xingchen Song) | COMMENT |
| LOW | src/f5_tts/runtime/triton_trtllm/client_http.py | 1 | # Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | COMMENT |
| LOW | src/f5_tts/runtime/triton_trtllm/client_grpc.py | 1 | #!/usr/bin/env python3 | COMMENT |
| LOW | …time/triton_trtllm/model_repo_f5_tts/f5_tts/1/model.py | 1 | # Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | COMMENT |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 1 | # SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | COMMENT |
| LOW | …untime/triton_trtllm/scripts/export_vocoder_to_onnx.py | 1 | # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. | COMMENT |
| LOW | …_tts/runtime/triton_trtllm/scripts/export_vocos_trt.sh | 1 | #!/bin/bash | COMMENT |
| LOW | src/f5_tts/runtime/triton_trtllm/scripts/conv_stft.py | 1 | # Modified from https://github.com/echocatzh/conv-stft/blob/master/conv_stft/conv_stft.py | COMMENT |
| LOW | src/f5_tts/runtime/triton_trtllm/scripts/conv_stft.py | 21 | # Permission is hereby granted, free of charge, to any person obtaining a copy | COMMENT |
| LOW | src/f5_tts/train/datasets/prepare_wenetspeech4tts.py | 121 | # pinyin vocab size 1349 1348 1344 (no polyphone) | COMMENT |
| LOW | src/f5_tts/train/datasets/prepare_emilia.py | 221 | # Emilia ZH & EN | COMMENT |
| LOW | src/f5_tts/infer/speech_edit.py | 81 | fix_duration = [ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/f5_tts/infer/utils_infer.py | 50 | # ----------------------------------------- | COMMENT |
| MEDIUM | src/f5_tts/infer/utils_infer.py | 67 | # ----------------------------------------- | COMMENT |
| MEDIUM | src/f5_tts/eval/eval_seedtts_testset.py | 70 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | src/f5_tts/eval/eval_librispeech_test_clean.py | 71 | # -------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/f5_tts/socket_client.py | 11 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/f5_tts/socket_server.py | 29 | logger = logging.getLogger(__name__) | CODE |
| LOW | src/f5_tts/runtime/triton_trtllm/patch/__init__.py | 65 | __all__ = [ | CODE |
| LOW | src/f5_tts/model/__init__.py | 8 | __all__ = ["CFM", "UNetT", "DiT", "MMDiT", "Trainer"] | CODE |
| LOW | src/f5_tts/model/dataset.py | 224 | def set_epoch(self, epoch: int) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/f5_tts/train/finetune_gradio.py | 390 | # Check if a training process is already running | COMMENT |
| LOW | src/f5_tts/infer/infer_gradio.py | 722 | # Check if all speech types in text are available | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/f5_tts/train/datasets/prepare_emilia.py | 2 | # if use updated new version, i.e. WebDataset, feel free to modify / draft your own script | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/f5_tts/infer/utils_infer.py | 587 | # Create a combined spectrogram | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/f5_tts/infer/speech_edit.py | 66 | # [leverage https://github.com/MahmoudAshraf97/ctc-forced-aligner to get char level alignment] | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | src/f5_tts/runtime/triton_trtllm/benchmark.py | 26 | --tllm-model-dir $TRTLLM_ENGINE_DIR || exit 1 | STRING |