kdrkdrkdr commited on
Commit
55abf8a
1 Parent(s): 8144511

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -12,6 +12,8 @@ import gradio as gr
12
  from models import SynthesizerTrn
13
  from text import text_to_sequence, _clean_text
14
  from mel_processing import spectrogram_torch
 
 
15
 
16
  limitation = os.getenv("SYSTEM") == "spaces" # limit text and audio length in huggingface spaces
17
 
@@ -23,7 +25,7 @@ def get_text(text, hps, is_phoneme):
23
  text_norm = LongTensor(text_norm)
24
  return text_norm
25
 
26
-
27
  def create_tts_fn(model, hps, speaker_ids):
28
  def tts_fn(text, speaker, speed, is_phoneme):
29
  if limitation:
 
12
  from models import SynthesizerTrn
13
  from text import text_to_sequence, _clean_text
14
  from mel_processing import spectrogram_torch
15
+ import spaces
16
+
17
 
18
  limitation = os.getenv("SYSTEM") == "spaces" # limit text and audio length in huggingface spaces
19
 
 
25
  text_norm = LongTensor(text_norm)
26
  return text_norm
27
 
28
+ @spaces.GPU
29
  def create_tts_fn(model, hps, speaker_ids):
30
  def tts_fn(text, speaker, speed, is_phoneme):
31
  if limitation: