hexgrad commited on
Commit
8ab445f
·
verified ·
1 Parent(s): e9b69d2

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -7,6 +7,7 @@ import numpy as np
7
  import os
8
  import phonemizer
9
  import random
 
10
  import torch
11
  import yaml
12
 
@@ -112,6 +113,7 @@ def s_curve(p):
112
 
113
  SAMPLE_RATE = 24000
114
 
 
115
  @torch.no_grad()
116
  def forward(text, voice, ps=None, speed=1.0, reduce_noise=0.5, opening_cut=5000, closing_cut=0, ease_in=3000, ease_out=0):
117
  ps = ps or phonemize(text, voice)
 
7
  import os
8
  import phonemizer
9
  import random
10
+ import spaces
11
  import torch
12
  import yaml
13
 
 
113
 
114
  SAMPLE_RATE = 24000
115
 
116
+ @spaces.GPU(duration=10)
117
  @torch.no_grad()
118
  def forward(text, voice, ps=None, speed=1.0, reduce_noise=0.5, opening_cut=5000, closing_cut=0, ease_in=3000, ease_out=0):
119
  ps = ps or phonemize(text, voice)