Text-to-Speech
F5-TTS
Telugu
tts
telugu
indicf5
finetuned

Telugu IndicF5 — Finetuned v2 (combined)

A fine-tuned variant of ai4bharat/IndicF5 on single-speaker Telugu tech-domain speech (~1093 combined samples from v1 + v2).

Files

File Description
model_last.pt F5-TTS native checkpoint (5.4 GB) with ema_model_state_dict + model_state_dict
vocab.txt Character vocabulary (mirror of ai4bharat/IndicF5)
prompts/sample_ref.wav Example reference clip (~6s)
prompts/sample_ref.txt Transcript of the reference clip
samples/test_output.wav Sanity-check inference output (base model)

Usage — fine-tuned model (manual checkpoint loading)

This fork's load_model does not accept a checkpoint path, so we load it manually.

import torch
import soundfile as sf

from cached_path import cached_path
from f5_tts.model import DiT, CFM
from f5_tts.infer.utils_infer import (
    load_vocoder,
    infer_process,
    get_tokenizer,
    n_mel_channels,
)

REPO = "Noothi/telugu-indicf5-combined-v2"

# Download files
ckpt_path = cached_path(f"hf://{REPO}/model_last.pt")
vocab_path = cached_path(f"hf://{REPO}/vocab.txt")

device = "cuda"

# Load vocoder
vocoder = load_vocoder(
    "vocos",
    is_local=False,
    device=device,
)

# Load tokenizer and vocabulary size
vocab_char_map, vocab_size = get_tokenizer(
    vocab_path,
    "custom",
)

# Build model
model_cfg = dict(
    dim=1024,
    depth=22,
    heads=16,
    ff_mult=2,
    text_dim=512,
    conv_layers=4,
)

model = CFM(
    transformer=DiT(
        **model_cfg,
        text_num_embeds=vocab_size,
        mel_dim=n_mel_channels,
    ),
    mel_spec_kwargs=dict(
        n_fft=1024,
        hop_length=256,
        win_length=1024,
        n_mel_channels=n_mel_channels,
        target_sample_rate=24000,
        mel_spec_type="vocos",
    ),
)

model = model.to(device)

# Load fine-tuned checkpoint
checkpoint = torch.load(
    ckpt_path,
    map_location=device,
)

state_dict = checkpoint.get(
    "ema_model_state_dict",
    checkpoint.get(
        "model_state_dict",
        checkpoint,
    ),
)

model.load_state_dict(
    state_dict,
    strict=False,
)

model.eval()

print("Fine-tuned model loaded successfully!")

# Reference audio and text
ref_audio = "prompts/sample_ref.wav"
ref_text = """మా ఆఫీస్ లో చాలా సార్లు కొంతమంది జావా ఫాస్ట్ అంటారు. ఇంకొంతమంది జావా కాదు నోడ్ జెఎస్ ఇంకా ఫాస్ట్ గా ఉంటది అంటారు. కొంతమందైతే ఆ రెండూ కాదు పైథాన్ సూపర్ గా ఉంటది అంటారు. ఇంకొంతమంది వేరేగా వచ్చి ఆ మూడు కాదు గాని గో, రస్ట్ అని రెండు లాంగ్వేజెస్ ఉన్నాయి అవైతే సూపర్ గా ఉంటాయి అంటారు"""

# Generate speech
wav, sr, _ = infer_process(
    ref_audio,
    ref_text,
    "నమస్తే! మీరు ఎలా ఉన్నారు?",
    model,
    vocoder,
    mel_spec_type="vocos",
    device=device,
    nfe_step=32,
    cfg_strength=2.0,
    speed=1.0,
)

sf.write(
    "output.wav",
    wav,
    sr,
)

Training

Continued from Noothi/telugu-indicf5-full-437samples for 10 epochs on the combined v1 + v2 dataset.

Final step: 2190
Final loss: approximately 0.518

License

MIT (inherits from base IndicF5).

Downloads last month
89
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Noothi/telugu-indicf5-combined-v2

Finetuned
(14)
this model

Datasets used to train Noothi/telugu-indicf5-combined-v2