|
Download README.md from FroxAI/Flex-TTS: direct link, hf CLI and curl.
- Browser
- Download file 3.08 kB
-
https://huggingface.co/FroxAI/Flex-TTS/resolve/main/README.md
- Command line
-
hf download hf://FroxAI/Flex-TTS/README.md
-
curl -L -o README.md https://huggingface.co/FroxAI/Flex-TTS/resolve/main/README.md
3.08 kB
| --- | |
| title: FroxAI Flex-Audio | |
| emoji: π¦ | |
| colorFrom: purple | |
| colorTo: pink | |
| sdk: gradio | |
| sdk_version: 5.9.1 | |
| app_file: app.py | |
| pinned: false | |
| pipeline_tag: text-to-speech | |
| license: other | |
| license_name: proprietary | |
| π¦ FroxAI β Flex-Audio | |
| Fine-tuned "XTTS-v2" (https://huggingface.co/coqui/XTTS-v2) text-to-speech model with real voice cloning, built by FroxAI. | |
| ποΈ Demo | |
| The repository includes a Gradio application in "app.py" with: | |
| - Text input | |
| - Language selection | |
| - Voice selection | |
| - Generated WAV output | |
| - Clickable demo examples | |
| Run the demo | |
| python app.py | |
| Β«Hugging Face: A model repository does not automatically execute "app.py" on its main page. The interactive model-page widget is available only when the model/task is supported by an Inference Provider. For this custom Gradio interface, deploy "app.py" as a Hugging Face Space to let visitors test it directly in a browser.Β» | |
| What's included | |
| - "model.pth" β fine-tuned model weights | |
| - "config.json" β base XTTS-v2 configuration required to reload the model | |
| - "vocab.json" β base model vocabulary required to reload the model | |
| - "voice_refs/" β reference voice clips for voice cloning | |
| - "app.py" β Gradio demo application | |
| - "src/inference.py" β reusable inference code | |
| - "requirements.txt" β Python dependencies | |
| π Repository structure | |
| . | |
| βββ app.py | |
| βββ config.json | |
| βββ model.pth | |
| βββ vocab.json | |
| βββ requirements.txt | |
| βββ src/ | |
| β βββ inference.py | |
| βββ voice_refs/ | |
| βββ slt.wav | |
| βββ bdl.wav | |
| βββ ... | |
| π Usage outside this Space | |
| The reusable inference interface can be used directly from Python: | |
| from src.inference import generate | |
| path = generate( | |
| text="Hello, this is Flex-Audio speaking.", | |
| language="en", | |
| voice="slt", # filename without .wav from voice_refs/ | |
| ) | |
| Load the model directly | |
| from TTS.tts.configs.xtts_config import XttsConfig | |
| from TTS.tts.models.xtts import Xtts | |
| config = XttsConfig() | |
| config.load_json("config.json") | |
| model = Xtts.init_from_config(config) | |
| model.load_checkpoint( | |
| config, | |
| checkpoint_dir=".", | |
| eval=True, | |
| ) | |
| model.cuda() | |
| outputs = model.synthesize( | |
| "Your text here", | |
| config, | |
| speaker_wav="voice_refs/slt.wav", | |
| language="en", | |
| ) | |
| π Languages | |
| Flex-Audio supports 17 languages with real voice cloning, inherited from XTTS-v2: | |
| en, es, fr, de, it, pt, pl, tr, ru, nl, cs, | |
| ar, zh-cn, ja, hu, ko, hi | |
| π€ Voices | |
| The "voice_refs/" directory contains the reference voice clips available for cloning. | |
| To use a voice, provide its filename without the ".wav" extension: | |
| voice="slt" | |
| For the complete list of available voices, see the files inside "voice_refs/". | |
| π License | |
| Proprietary / All Rights Reserved. | |
| No permission is granted to use, copy, modify, distribute, sublicense, sell, or deploy the model or its files except as expressly permitted by the copyright holder. | |
| The model also inherits the applicable terms of its base model. Check the "XTTS-v2 license" (https://huggingface.co/coqui/XTTS-v2) before using or redistributing this model. |