Official code for "F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching"
This report summarizes scanner evidence for SWivid/F5-TTS, a Python project with 15,371 GitHub stars. SynthScan examined 21,032 lines of code across 81 source files, recording 153 pattern matches distributed across 15 syntactic categories. The legacy adjusted pattern signal is 9.8 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 80 finding(s).
Are imports declared and package/API names verified? 38 finding(s).
Are wrappers, guards, and repeated structures necessary? 71 finding(s).
Which changes need focused human review? 153 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 153 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 | 308 | 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 |
|---|---|---|---|---|
| HIGH | src/f5_tts/train/finetune_gradio.py | 325 | except OSError: | CODE |
| HIGH | src/f5_tts/train/finetune_gradio.py | 330 | except OSError: | CODE |
| HIGH | src/f5_tts/train/finetune_gradio.py | 548 | except queue.Empty: | CODE |
| HIGH | src/f5_tts/train/finetune_gradio.py | 558 | except queue.Empty: | 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 | 540 | def infer_single_process_streaming(gen_text, fix_dur): | CODE |
| LOW | src/f5_tts/infer/utils_infer.py | 612 | 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 | 600 | # 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 |