Rehman1603 commited on
Commit
edbebd6
1 Parent(s): 538626e

Update Text_to_speech.py

Browse files
Files changed (1) hide show
  1. Text_to_speech.py +2 -6
Text_to_speech.py CHANGED
@@ -3,14 +3,10 @@ from TTS.api import TTS
3
  import os
4
  from TTS.utils.manage import ModelManager
5
 
6
- model_name = "tts_models/multilingual/multi-dataset/xtts_v2"
7
- model_manager = ModelManager()
8
- model_manager.download_model(model_name)
9
  # Get device
10
  device = "cuda" if torch.cuda.is_available() else "cpu"
11
- tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2",progress_bar=False).to(device)
12
- default_answer = "y"
13
- answer = input()
14
 
15
  def Text_to_Speech(transcribe_data,lang,voice):
16
  # List available 🐸TTS models
 
3
  import os
4
  from TTS.utils.manage import ModelManager
5
 
6
+ os.environ["COQUI_TOS_AGREED"] = "1"
 
 
7
  # Get device
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
+ tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2",progress_bar=False).to(device)
 
 
10
 
11
  def Text_to_Speech(transcribe_data,lang,voice):
12
  # List available 🐸TTS models