Rehman1603 commited on
Commit
496bbeb
1 Parent(s): 2e850ab

Update Text_to_speech.py

Browse files
Files changed (1) hide show
  1. Text_to_speech.py +4 -3
Text_to_speech.py CHANGED
@@ -1,11 +1,12 @@
1
  import torch
2
  from TTS.api import TTS
3
 
 
 
4
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
5
- def Text_to_Speech(transcribe_data,lang,voice):
6
- # Get device
7
- device = "cuda" if torch.cuda.is_available() else "cpu"
8
 
 
 
9
  # List available 🐸TTS models
10
  print(TTS().list_models())
11
 
 
1
  import torch
2
  from TTS.api import TTS
3
 
4
+ # Get device
5
+ device = "cuda" if torch.cuda.is_available() else "cpu"
6
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
 
 
 
7
 
8
+
9
+ def Text_to_Speech(transcribe_data,lang,voice):
10
  # List available 🐸TTS models
11
  print(TTS().list_models())
12