tonyassi commited on
Commit
3f53728
1 Parent(s): 11fdcf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import torch
3
  from TTS.api import TTS
@@ -8,6 +9,7 @@ device = "cuda"
8
 
9
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
10
 
 
11
  def clone(text, audio):
12
  tts.tts_to_file(text=text, speaker_wav=audio, language="en", file_path="./output.wav")
13
  return "./output.wav"
 
1
+ import spaces
2
  import gradio as gr
3
  import torch
4
  from TTS.api import TTS
 
9
 
10
  tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)
11
 
12
+ @spaces.GPU(enable_queue=True)
13
  def clone(text, audio):
14
  tts.tts_to_file(text=text, speaker_wav=audio, language="en", file_path="./output.wav")
15
  return "./output.wav"