{"id":30068409,"url":"https://github.com/jeantimex/f5-tts-server","last_synced_at":"2025-09-06T11:39:13.380Z","repository":{"id":307418730,"uuid":"1029431967","full_name":"jeantimex/F5-TTS-Server","owner":"jeantimex","description":"F5-TTS server APIs for voice cloning and text-to-speech generation with interactive waveform visualization.","archived":false,"fork":false,"pushed_at":"2025-08-04T04:29:21.000Z","size":1799,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T07:34:46.428Z","etag":null,"topics":["f5-tts","fastapi","text-to-speech"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jeantimex.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":"2025-07-31T03:40:50.000Z","updated_at":"2025-08-07T00:01:05.000Z","dependencies_parsed_at":"2025-07-31T06:58:25.952Z","dependency_job_id":null,"html_url":"https://github.com/jeantimex/F5-TTS-Server","commit_stats":null,"previous_names":["jeantimex/f5-tts-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeantimex/F5-TTS-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeantimex%2FF5-TTS-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeantimex%2FF5-TTS-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeantimex%2FF5-TTS-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeantimex%2FF5-TTS-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeantimex","download_url":"https://codeload.github.com/jeantimex/F5-TTS-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeantimex%2FF5-TTS-Server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269403464,"owners_count":24411214,"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-08T02:00:09.200Z","response_time":72,"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":["f5-tts","fastapi","text-to-speech"],"created_at":"2025-08-08T10:10:44.710Z","updated_at":"2025-08-08T10:10:48.631Z","avatar_url":"https://github.com/jeantimex.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# F5-TTS Server\n\nThis project provides a web server and a user-friendly interface for the F5-TTS model, allowing you to easily perform text-to-speech synthesis with voice cloning capabilities.\n\n![F5-TTS Server Interface](f5-tts-server-app.png)\n\n## How to Use\n\n1.  **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/jeantimex/F5-TTS-Server.git\n    cd F5-TTS-Server\n    ```\n\n2.  **Create and activate a virtual environment:**\n\n    ```bash\n    python -m venv .venv\n    source .venv/bin/activate\n    ```\n\n3.  **Run the start script:**\n\n    This will install the required dependencies and start the server.\n\n    ```bash\n    ./start.sh\n    ```\n\n    The server will be running at `http://127.0.0.1:8000`.\n\n## Features\n\n* **Web Interface:** A simple and intuitive web UI to generate speech without using the command line.\n* **Voice Cloning:** Use your own reference audio files to clone voices for TTS.\n* **Customization:** Adjust speech speed, NFE steps, cross-fade duration, and more.\n* **File Management:** Upload and delete custom reference audio files directly through the UI.\n* **REST API:** A comprehensive API for programmatic access to all TTS functions.\n* **Real-time Cancellation:** Cancel TTS jobs that are in progress.\n\n## API Endpoints\n\nHere are the available API endpoints with `curl` examples.\n\n### Get Frontend\n\nServes the main HTML page.\n\n```bash\ncurl -X GET http://127.0.0.1:8000/\n```\n\n### List Reference Audios\n\nGet a list of all available reference audio files.\n\n```bash\ncurl -X GET http://127.0.0.1:8000/ref-audios/\n```\n\n### Upload Reference Audio\n\nUpload a new reference audio file.\n\n```bash\ncurl -X POST http://127.0.0.1:8000/upload-ref-audio/ \\\n     -F \"file=@/path/to/your/audio.wav\"\n```\n\n### Upload Reference Text File\n\nUpload a `.txt` file corresponding to a reference audio. The filename of the text file should match the audio file's name (e.g., `my_audio.wav` and `my_audio.txt`).\n\n```bash\ncurl -X POST http://127.0.0.1:8000/upload-text-file/ \\\n     -F \"file=@/path/to/your/text.txt\"\n```\n\n### Delete Reference Audio\n\nDelete a custom reference audio file. Note: You can only delete files from the `custom` folder.\n\n```bash\n# Replace 'custom/your_audio.wav' with the actual file path\ncurl -X DELETE http://127.0.0.1:8000/delete-ref-audio/custom/your_audio.wav\n```\n\n### Serve Reference Audio\n\nGet a specific reference audio file.\n\n```bash\n# Replace 'default/basic_ref_en.wav' with the actual file path\ncurl -X GET http://127.0.0.1:8000/ref-audios/default/basic_ref_en.wav -o ref_audio.wav\n```\n\n### Text-to-Speech Generation\n\nGenerate speech from text. This is the main endpoint.\n\n#### Basic Example\n\nThis example uses the default settings, including the default English reference voice.\n\n```bash\ncurl -X POST http://127.0.0.1:8000/tts/ \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"gen_text\": \"Hello, world! This is a test of the F5-TTS server.\"\n         }' \\\n     --output basic_speech.wav\n```\n\n#### Multi-language Example\n\nYou can generate speech in different languages by specifying the appropriate reference audio.\n\n**English Example**\n\n```bash\ncurl -X POST http://127.0.0.1:8000/tts/ \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"gen_text\": \"This is a test in English.\",\n           \"ref_audio\": \"default/basic_ref_en.wav\"\n         }' \\\n     --output english_speech.wav\n```\n\n**Chinese Example**\n\n```bash\ncurl -X POST http://127.0.0.1:8000/tts/ \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"gen_text\": \"这是一个中文测试。\",\n           \"ref_audio\": \"default/basic_ref_zh.wav\"\n         }' \\\n     --output chinese_speech.wav\n```\n\n#### Customization Example\n\nThis example adjusts the speech speed and quality (NFE steps).\n\n```bash\ncurl -X POST http://127.0.0.1:8000/tts/ \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"gen_text\": \"I can speak faster or slower depending on the settings.\",\n           \"speed\": 1.2,\n           \"nfe_steps\": 40\n         }' \\\n     --output custom_speech.wav\n```\n\n#### Voice Cloning Example\n\nTo clone a voice, you first need to upload a reference audio file, then use its path in your TTS request.\n\n**Step 1: Upload a reference audio**\n\n```bash\ncurl -X POST http://127.0.0.1:8000/upload-ref-audio/ \\\n     -F \"file=@/path/to/your/voice_sample.wav\"\n```\n\nThe server will respond with a JSON object containing the filename, for example: `{\"filename\": \"custom/voice_sample.wav\"}`.\n\n**Step 2: Use the uploaded audio for TTS**\n\n**Important Note:** For the best voice cloning results, it is highly recommended to provide the transcript of your reference audio. You can do this by uploading a `.txt` file with the same name as your audio file (e.g., `voice_sample.wav` and `voice_sample.txt`). If you don't provide a text file, the server will attempt to automatically transcribe the audio, but the quality may vary.\n\nUse the `filename` from the previous step as the `ref_audio` in your request.\n\n```bash\ncurl -X POST http://127.0.0.1:8000/tts/ \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"gen_text\": \"This text will be spoken in the voice from the uploaded audio file.\",\n           \"ref_audio\": \"custom/voice_sample.wav\"\n         }' \\\n     --output cloned_speech.wav\n```\n\n### Cancel TTS Generation\n\nCancel a running TTS generation process. You need the `request_id` which is returned in the headers of the `/tts` response.\n\n```bash\n# Replace 'your_request_id' with the actual request ID\ncurl -X POST http://127.0.0.1:8000/cancel-tts/your_request_id\n```\n\n### Get TTS Status\n\nCheck the status of a TTS generation request.\n\n```bash\n# Replace 'your_request_id' with the actual request ID\ncurl -X GET http://127.0.0.1:8000/tts-status/your_request_id\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeantimex%2Ff5-tts-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeantimex%2Ff5-tts-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeantimex%2Ff5-tts-server/lists"}