Instructions to use yogenghodke/indic-f5-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use yogenghodke/indic-f5-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir indic-f5-mlx yogenghodke/indic-f5-mlx
- F5-TTS
How to use yogenghodke/indic-f5-mlx with F5-TTS:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
| """Minimal IndicF5-MLX example. | |
| Prereqs: | |
| 1. Apple-Silicon Mac | |
| 2. `huggingface-cli login` and accept the gate at https://huggingface.co/ai4bharat/IndicF5 | |
| 3. A 24 kHz mono reference clip + its transcript | |
| """ | |
| import soundfile as sf | |
| from indic_f5_mlx import load_indicf5, generate | |
| REF_AUDIO = "reference_24k_mono.wav" # ~5-10s clean natural voice | |
| REF_TEXT = "transcript of the reference clip in its language" | |
| # Numbers spelled out as words (३७० -> तीनशे सत्तर), not digits. | |
| TEXT = ("भारतीय संविधानाच्या अनुच्छेद तीनशे सत्तर नुसार, सव्वीस जानेवारी एकोणीसशे पन्नास रोजी " | |
| "प्रजासत्ताक भारताची स्थापना झाली.") | |
| model, _ = load_indicf5() # downloads + converts ai4bharat/IndicF5 | |
| audio = generate(model, ref_audio_path=REF_AUDIO, ref_text=REF_TEXT, text=TEXT, steps=16) | |
| sf.write("out.wav", audio, 24000) | |
| print(f"wrote out.wav ({len(audio)/24000:.1f}s)") | |