{"id":18165570,"url":"https://github.com/lucasnewman/f5-tts-swift","last_synced_at":"2025-08-22T03:14:30.477Z","repository":{"id":258666917,"uuid":"875333126","full_name":"lucasnewman/f5-tts-swift","owner":"lucasnewman","description":"Implementation of F5-TTS in Swift using MLX","archived":false,"fork":false,"pushed_at":"2024-12-11T23:47:58.000Z","size":251,"stargazers_count":63,"open_issues_count":4,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-13T06:44:03.176Z","etag":null,"topics":["diffusion-transformer","flow-matching","mlx","mlx-swift","swift","text-to-speech","tts"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucasnewman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-19T17:40:14.000Z","updated_at":"2025-04-10T11:56:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"a559a822-fff1-4087-a5ba-4b054c6b82f6","html_url":"https://github.com/lucasnewman/f5-tts-swift","commit_stats":null,"previous_names":["lucasnewman/f5-tts-swift"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lucasnewman/f5-tts-swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasnewman%2Ff5-tts-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasnewman%2Ff5-tts-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasnewman%2Ff5-tts-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasnewman%2Ff5-tts-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucasnewman","download_url":"https://codeload.github.com/lucasnewman/f5-tts-swift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucasnewman%2Ff5-tts-swift/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271578523,"owners_count":24784053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diffusion-transformer","flow-matching","mlx","mlx-swift","swift","text-to-speech","tts"],"created_at":"2024-11-02T12:07:49.038Z","updated_at":"2025-08-22T03:14:30.447Z","avatar_url":"https://github.com/lucasnewman.png","language":"Swift","funding_links":[],"categories":["Rising projects"],"sub_categories":[],"readme":"\n# F5 TTS for Swift\n\nImplementation of [F5-TTS](https://arxiv.org/abs/2410.06885) in Swift, using the [MLX Swift](https://github.com/ml-explore/mlx-swift) framework.\n\nYou can listen to a [sample here](https://s3.amazonaws.com/lucasnewman.datasets/f5tts/sample.wav) that was generated in ~11 seconds on an M3 Max MacBook Pro.\n\nSee the [Python repository](https://github.com/lucasnewman/f5-tts-mlx) for additional details on the model architecture.\n\nThis repository is based on the original Pytorch implementation available [here](https://github.com/SWivid/F5-TTS).\n\n\n## Installation\n\nThe `F5TTS` Swift package can be built and run from Xcode or SwiftPM.\n\nA pretrained model is available [on Huggingface](https://hf.co/lucasnewman/f5-tts-mlx).\n\n\n## Usage\n\n```swift\nimport F5TTS\n\nlet f5tts = try await F5TTS.fromPretrained(repoId: \"lucasnewman/f5-tts-mlx\")\n\nlet generatedAudio = try await f5tts.generate(text: \"The quick brown fox jumped over the lazy dog.\")\n```\n\nThe result is an MLXArray with 24kHz audio samples.\n\nIf you want to use your own reference audio sample, make sure it's a mono, 24kHz wav file of around 5-10 seconds:\n\n```swift\nlet generatedAudio = try await f5tts.generate(\n    text: \"The quick brown fox jumped over the lazy dog.\",\n    referenceAudioURL: ...,\n    referenceAudioText: \"This is the caption for the reference audio.\"\n)\n```\n\nYou can convert an audio file to the correct format with ffmpeg like this:\n\n```bash\nffmpeg -i /path/to/audio.wav -ac 1 -ar 24000 -sample_fmt s16 -t 10 /path/to/output_audio.wav\n```\n\n## Appreciation\n\n[Yushen Chen](https://github.com/SWivid) for the original Pytorch implementation of F5 TTS and pretrained model.\n\n[Phil Wang](https://github.com/lucidrains) for the E2 TTS implementation that this model is based on.\n\n## Citations\n\n```bibtex\n@article{chen-etal-2024-f5tts,\n      title={F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching}, \n      author={Yushen Chen and Zhikang Niu and Ziyang Ma and Keqi Deng and Chunhui Wang and Jian Zhao and Kai Yu and Xie Chen},\n      journal={arXiv preprint arXiv:2410.06885},\n      year={2024},\n}\n```\n\n```bibtex\n@inproceedings{Eskimez2024E2TE,\n    title   = {E2 TTS: Embarrassingly Easy Fully Non-Autoregressive Zero-Shot TTS},\n    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},\n    year    = {2024},\n    url     = {https://api.semanticscholar.org/CorpusID:270738197}\n}\n```\n\n## License\n\nThe code in this repository is released under the MIT license as found in the\n[LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasnewman%2Ff5-tts-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucasnewman%2Ff5-tts-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucasnewman%2Ff5-tts-swift/lists"}