Update app.py
Browse files
app.py
CHANGED
|
@@ -175,7 +175,8 @@ def synthesize_speech(synth_text, target_lang, gender="Male", pace="normal", out
|
|
| 175 |
|
| 176 |
print("> Loading IndicF5 TTS model (ai4bharat/IndicF5)...")
|
| 177 |
indicf5_repo_id = "ai4bharat/IndicF5"
|
| 178 |
-
|
|
|
|
| 179 |
|
| 180 |
audio = tts_model(synth_text, ref_audio_path=ref_audio_path, ref_text=ref_text)
|
| 181 |
|
|
|
|
| 175 |
|
| 176 |
print("> Loading IndicF5 TTS model (ai4bharat/IndicF5)...")
|
| 177 |
indicf5_repo_id = "ai4bharat/IndicF5"
|
| 178 |
+
token = os.environ.get("HF_TOKEN")
|
| 179 |
+
tts_model = AutoModel.from_pretrained(indicf5_repo_id, token=token, trust_remote_code=True).to(device)
|
| 180 |
|
| 181 |
audio = tts_model(synth_text, ref_audio_path=ref_audio_path, ref_text=ref_text)
|
| 182 |
|