Skip to main content

F5-TTS - MLX

Project description

F5 TTS diagram

F5 TTS — MLX

Implementation of F5-TTS, with the MLX framework.

F5 TTS is a non-autoregressive, zero-shot text-to-speech system using a flow-matching mel spectrogram generator with a diffusion transformer (DiT).

You can listen to a sample here that was generated in ~11 seconds on an M3 Max MacBook Pro.

F5 is an evolution of E2 TTS and improves performance with ConvNeXT v2 blocks for the learned text alignment. This repository is based on the original Pytorch implementation available here.

Installation

pip install f5-tts-mlx

Usage

python -m f5_tts_mlx.generate \
--text "The quick brown fox jumped over the lazy dog." \
--duration 3.5

See examples/generate.py for more options.

You can load a pretrained model from Python like this:

from f5_tts_mlx import F5TTS

f5tts = F5TTS.from_pretrained("lucasnewman/f5-tts-mlx")

audio = f5tts.sample(...)

Pretrained model weights are also available on Hugging Face.

Appreciation

Yushen Chen for the original Pytorch implementation of F5 TTS and pretrained model.

Phil Wang for the E2 TTS implementation that this model is based on.

Citations

@article{chen-etal-2024-f5tts,
      title={F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching}, 
      author={Yushen Chen and Zhikang Niu and Ziyang Ma and Keqi Deng and Chunhui Wang and Jian Zhao and Kai Yu and Xie Chen},
      journal={arXiv preprint arXiv:2410.06885},
      year={2024},
}
@inproceedings{Eskimez2024E2TE,
    title   = {E2 TTS: Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS},
    author  = {Sefik Emre Eskimez and Xiaofei Wang and Manthan Thakker and Canrun Li and Chung-Hsien Tsai and Zhen Xiao and Hemin Yang and Zirun Zhu and Min Tang and Xu Tan and Yanqing Liu and Sheng Zhao and Naoyuki Kanda},
    year    = {2024},
    url     = {https://api.semanticscholar.org/CorpusID:270738197}
}

License

The code in this repository is released under the MIT license as found in the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

f5_tts_mlx-0.0.7.tar.gz (231.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

f5_tts_mlx-0.0.7-py3-none-any.whl (229.7 kB view details)

Uploaded Python 3

File details

Details for the file f5_tts_mlx-0.0.7.tar.gz.

File metadata

  • Download URL: f5_tts_mlx-0.0.7.tar.gz
  • Upload date:
  • Size: 231.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for f5_tts_mlx-0.0.7.tar.gz
Algorithm Hash digest
SHA256 a74b3a9410465b3046ea5a3773957cf052b6f2840597eb55a5ae97b2d5a0447d
MD5 ab48c19c01463f8c0a2a78efdaa787bf
BLAKE2b-256 148be063fcb59877fe7ffc932ea5986e8d060b6657fd9486234f0d775da4a6eb

See more details on using hashes here.

File details

Details for the file f5_tts_mlx-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: f5_tts_mlx-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 229.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for f5_tts_mlx-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d6428dd276e04151fb7f80265a40a788f15f383d32da0225ad53c2d41ac96eff
MD5 8186f3888f30e6704c3f3c9c0597ba9c
BLAKE2b-256 236bfc60567d90bff63acbd2090ad43b95470348c05445e34784acac7cc59d81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page