mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 17:24:54 +00:00
🎨 Run linter
This commit is contained in:
@@ -103,7 +103,9 @@ class CoquiTTSEngine(BaseTTSEngine):
|
||||
try:
|
||||
self.tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2")
|
||||
except:
|
||||
raise Exception("An error occured when loading thr TTS model. Make sure that you have agreed to the TOS in the TTSEngine tab.")
|
||||
raise Exception(
|
||||
"An error occured when loading thr TTS model. Make sure that you have agreed to the TOS in the TTSEngine tab."
|
||||
)
|
||||
device = "cuda" if torch.cuda.is_available() else "cpu"
|
||||
self.tts.to(device)
|
||||
|
||||
@@ -124,9 +126,7 @@ class CoquiTTSEngine(BaseTTSEngine):
|
||||
if self.to_force_duration:
|
||||
self.force_duration(float(self.duration), path)
|
||||
|
||||
self.ctx.duration = self.get_audio_duration(path)
|
||||
|
||||
self.ctx.timed_script = self.time_with_whisper(path)
|
||||
return self.get_audio_duration(path)
|
||||
|
||||
@classmethod
|
||||
def get_options(cls) -> list:
|
||||
@@ -162,10 +162,12 @@ class CoquiTTSEngine(BaseTTSEngine):
|
||||
options.append(duration_checkbox)
|
||||
options.append(duration)
|
||||
|
||||
options.append(gr.Checkbox(
|
||||
label="I agree to the Coqui public mode license",
|
||||
info="You must agree to the Coqui TTS terms of service to use this engine: https://coqui.ai/cpml",
|
||||
value=False,
|
||||
show_label=True,
|
||||
))
|
||||
options.append(
|
||||
gr.Checkbox(
|
||||
label="I agree to the Coqui public mode license",
|
||||
info="You must agree to the Coqui TTS terms of service to use this engine: https://coqui.ai/cpml",
|
||||
value=False,
|
||||
show_label=True,
|
||||
)
|
||||
)
|
||||
return options
|
||||
|
||||
Reference in New Issue
Block a user