Indic-FS is a full-stack web application that allows users to record or upload a sample of their voice once and synthesize high-fidelity speech in 11 different Indian languages using their cloned voice. Leveraging advanced deep learning models, it bridges linguistic barriers across India by keeping the speaker's unique vocal identity consistent.
+-------------------------------------------------+
| Frontend (HTML5 + Three.js 3D) |
+-------------------------------------------------+
| (Upload Audio) ^ (Play / Download Audio)
v |
+-----------------------+ +-----------------------+
| POST /upload-voice | | POST /synthesize |
+-----------------------+ +-----------------------+
| |
| (Save to uploads/) | (Invoke ML Pipeline)
v v
+-----------------+ +-----------------+
| utils.py | | pipeline.py |
+-----------------+ +-----------------+
- Audio load/save - Script detector
- 3s Min Validation - Text Translation
- Resampling/Mono - Speech Synthesis
/ \
v v
+---------------+ +---------------+
| IndicTrans2 | | IndicF5 |
| NMT Model | | TTS Model |
+---------------+ +---------------+
\ /
v v
(Outputs Saved to outputs/)
git clone <repository_url>
cd indic-fs
pip install -r requirements.txt
You need to install the IndicTransToolkit / inference engine from the official repository:
git clone https://github.com/AI4Bharat/IndicTrans2.git
cd IndicTrans2/inference
pip install -e .
cd ../..
python -m uvicorn main:app --host 0.0.0.0 --port 8000
Open your browser and visit http://localhost:8000 to access the application.
POST /upload-voiceUploads a reference voice sample from the user, validates that the duration is over 3 seconds, and registers it.
file){
"voice_id": "8bfa2e9a-4c28-4bc2-9e90-258079a4de54",
"filename": "uploads/ref_8bfa2e9a-4c28-4bc2-9e90-258079a4de54.wav",
"duration": 5.43
}
POST /synthesizeTranslates and synthesizes input text into a cloned voice in multiple target languages.
{
"voice_id": "8bfa2e9a-4c28-4bc2-9e90-258079a4de54",
"text": "नमस्ते, आप कैसे हैं?",
"target_langs": ["hi", "ta", "te"],
"source_lang": "hi" // optional, auto-detected if omitted
}
{
"outputs": {
"hi": "/download/output_hi_2e9afc28.wav",
"ta": "/download/output_ta_4d98ab32.wav",
"te": "/download/output_te_1f23cd89.wav"
}
}
GET /download/{filename}Downloads the generated/uploaded WAV audio file from the server.
filename (e.g. output_hi_2e9afc28.wav)GET /healthPerforms checks on backend models and environment.
{
"status": "ok",
"models_loaded": true
}
GET /Serves the 3D-interactive single-page web dashboard interface.
| Code | Language | Native Script |
|---|---|---|
hi | Hindi | हिंदी |
ta | Tamil | தமிழ் |
te | Telugu | తెలుగు |
kn | Kannada | ಕನ್ನಡ |
ml | Malayalam | മലയാളം |
bn | Bengali | বাংলা |
mr | Marathi | मराठी |
gu | Gujarati | ગુજરાતી |
pa | Punjabi | ਪੰਜਾਬੀ |
or | Odia | ଓଡ଼ିଆ |
as | Assamese | অসমীয়া |
Transformers Compatibility:
IndicF5 is built on F5-TTS, which depends strictly on transformers==4.49.0. Standard environments downloading a newer version will throw module-attribute errors. Ensure you keep it pinned.
CUDA vs CPU: For acceptable speed during synthesis, a GPU is recommended. The backend will automatically fall back to CPU if CUDA is not available. If you see high latency, please check that PyTorch detects your GPU by running:
import torch
print(torch.cuda.is_available())
Hugging Face Hub Authentication:
Downloading these models requires a Hugging Face Token. The application is pre-configured to use the developer token provided, but you can override it in models.py or by setting the HF_TOKEN environment variable.
HTML
62.3%
Python
37.7%
Indic-FS is a full-stack web application that allows users to record or upload a sample of their voice once and synthesize high-fidelity speech in 11 different Indian languages using their cloned voice. Leveraging advanced deep learning models, it bridges linguistic barriers across India by keeping the speaker's unique vocal identity consistent.
+-------------------------------------------------+
| Frontend (HTML5 + Three.js 3D) |
+-------------------------------------------------+
| (Upload Audio) ^ (Play / Download Audio)
v |
+-----------------------+ +-----------------------+
| POST /upload-voice | | POST /synthesize |
+-----------------------+ +-----------------------+
| |
| (Save to uploads/) | (Invoke ML Pipeline)
v v
+-----------------+ +-----------------+
| utils.py | | pipeline.py |
+-----------------+ +-----------------+
- Audio load/save - Script detector
- 3s Min Validation - Text Translation
- Resampling/Mono - Speech Synthesis
/ \
v v
+---------------+ +---------------+
| IndicTrans2 | | IndicF5 |
| NMT Model | | TTS Model |
+---------------+ +---------------+
\ /
v v
(Outputs Saved to outputs/)
git clone <repository_url>
cd indic-fs
pip install -r requirements.txt
You need to install the IndicTransToolkit / inference engine from the official repository:
git clone https://github.com/AI4Bharat/IndicTrans2.git
cd IndicTrans2/inference
pip install -e .
cd ../..
python -m uvicorn main:app --host 0.0.0.0 --port 8000
Open your browser and visit http://localhost:8000 to access the application.
POST /upload-voiceUploads a reference voice sample from the user, validates that the duration is over 3 seconds, and registers it.
file){
"voice_id": "8bfa2e9a-4c28-4bc2-9e90-258079a4de54",
"filename": "uploads/ref_8bfa2e9a-4c28-4bc2-9e90-258079a4de54.wav",
"duration": 5.43
}
POST /synthesizeTranslates and synthesizes input text into a cloned voice in multiple target languages.
{
"voice_id": "8bfa2e9a-4c28-4bc2-9e90-258079a4de54",
"text": "नमस्ते, आप कैसे हैं?",
"target_langs": ["hi", "ta", "te"],
"source_lang": "hi" // optional, auto-detected if omitted
}
{
"outputs": {
"hi": "/download/output_hi_2e9afc28.wav",
"ta": "/download/output_ta_4d98ab32.wav",
"te": "/download/output_te_1f23cd89.wav"
}
}
GET /download/{filename}Downloads the generated/uploaded WAV audio file from the server.
filename (e.g. output_hi_2e9afc28.wav)GET /healthPerforms checks on backend models and environment.
{
"status": "ok",
"models_loaded": true
}
GET /Serves the 3D-interactive single-page web dashboard interface.
| Code | Language | Native Script |
|---|---|---|
hi | Hindi | हिंदी |
ta | Tamil | தமிழ் |
te | Telugu | తెలుగు |
kn | Kannada | ಕನ್ನಡ |
ml | Malayalam | മലയാളം |
bn | Bengali | বাংলা |
mr | Marathi | मराठी |
gu | Gujarati | ગુજરાતી |
pa | Punjabi | ਪੰਜਾਬੀ |
or | Odia | ଓଡ଼ିଆ |
as | Assamese | অসমীয়া |
Transformers Compatibility:
IndicF5 is built on F5-TTS, which depends strictly on transformers==4.49.0. Standard environments downloading a newer version will throw module-attribute errors. Ensure you keep it pinned.
CUDA vs CPU: For acceptable speed during synthesis, a GPU is recommended. The backend will automatically fall back to CPU if CUDA is not available. If you see high latency, please check that PyTorch detects your GPU by running:
import torch
print(torch.cuda.is_available())
Hugging Face Hub Authentication:
Downloading these models requires a Hugging Face Token. The application is pre-configured to use the developer token provided, but you can override it in models.py or by setting the HF_TOKEN environment variable.
HTML
62.3%
Python
37.7%