Spaces:
Runtime error
Runtime error
Salman11223
commited on
Commit
•
68f7fb0
1
Parent(s):
65f917d
Update translate.py
Browse files- translate.py +11 -1
translate.py
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
from TTS.api import TTS
|
2 |
-
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=True).to("cuda")
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
import subprocess
|
6 |
import assemblyai as aai
|
@@ -96,6 +102,10 @@ class translation:
|
|
96 |
transcript_text = self.transcribe_audio(audio_path)
|
97 |
translated_text = self.translate_text(transcript_text)
|
98 |
translated_audio_path = self.generate_audio(translated_text)
|
|
|
|
|
|
|
|
|
99 |
#Generate video
|
100 |
# %cd /content/Wav2Lip
|
101 |
|
|
|
1 |
from TTS.api import TTS
|
|
|
2 |
|
3 |
+
# Confirm licensing or agreement to terms
|
4 |
+
confirm_license = input("Have you purchased a commercial license from Coqui or agree to the terms of the non-commercial CPML? (y/n): ")
|
5 |
+
if confirm_license.lower() not in ['y', 'yes']:
|
6 |
+
raise ValueError("You must agree to the licensing terms to use this library.")
|
7 |
+
|
8 |
+
# Initialize TTS
|
9 |
+
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=True).to("cuda")
|
10 |
|
11 |
import subprocess
|
12 |
import assemblyai as aai
|
|
|
102 |
transcript_text = self.transcribe_audio(audio_path)
|
103 |
translated_text = self.translate_text(transcript_text)
|
104 |
translated_audio_path = self.generate_audio(translated_text)
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
#Generate video
|
110 |
# %cd /content/Wav2Lip
|
111 |
|