IndicF5-Hinglish (repackaged)

Hindi-English code-switched TTS. This is a repackaging of itself a fine-tune of ai4bharat/IndicF5.

The weights are unchanged. What's different: vocabulary, model code and a default reference voice ship with this repo, so loading needs no gated downloads and no f5_tts install.

Usage

from transformers import AutoModel
import soundfile as sf

model = AutoModel.from_pretrained(
    "Tharshan/indicf5_hindi-english_code_switch", trust_remote_code=True)

audio, sr = model.generate("मैं आज office जा रहा हूँ, morning में एक important meeting है।")
sf.write("out.wav", audio, sr)

Your own voice (F5 is a zero-shot cloner; the transcript must match the clip):

audio, sr = model.generate(text, ref_audio="my_voice.wav", ref_text="exact transcript")

pip install -r requirements.txt

Reference voice matters more than you'd expect

Same weights, same sentences, only the prompt clip changed:

Reference Hindi CER (base) Hindi CER (this model)
Punjabi prompt 0.147 0.347
Hinglish prompt (bundled) 0.021 0.011

Use a reference whose language and accent resemble your target text.

Evaluation

Whisper large-v3, bundled Hinglish reference, CER against input text:

Text type base IndicF5 this model
Pure Hindi 0.021 0.011
Pure English 0.780 0.220

English improves substantially; Hindi is not degraded.

Code-switched text: raw CER is unreliable and ranks the two models backwards. Whisper writes correctly-pronounced English words in Devanagari (morning → मॉर्णिंग), scored as errors against Latin-script references. By transcript inspection this model renders the English words correctly while base produces gibberish, despite base scoring "better". Use a transliteration-aware scorer.

Details

Base ai4bharat/IndicF5 (F5-TTS DiT, 0.3B)
Fine-tuning data OpenSLR-104 Hindi-English
Steps 32,990
Vocab 2546 chars, unchanged from IndicF5
Sample rate 24 kHz

Training audio was ASR-corpus material resampled to 24 kHz, so high-frequency detail is limited by the sources. Expect a slightly duller timbre than base.

Credits

  • Base model and vocab.txt: ai4bharat/IndicF5 — MIT, subject to AI4Bharat's terms of use
  • Model code vendored from F5-TTS — MIT
  • Bundled reference voice generated with Sarvam AI bulbul:v3

Do not clone voices without the speaker's consent.

Downloads last month
53
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Tharshan/indicf5_hindi-english_code_switch

Finetuned
(17)
this model

Space using Tharshan/indicf5_hindi-english_code_switch 1