Spaces:
Running
on
T4
Running
on
T4
Commit
·
996c06e
1
Parent(s):
4390629
adde zero gpu
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import soundfile as sf
|
|
4 |
import tempfile
|
5 |
import os
|
6 |
import warnings
|
|
|
7 |
warnings.filterwarnings("ignore")
|
8 |
|
9 |
try:
|
@@ -36,6 +37,7 @@ class TaDiCodecTTSDemo:
|
|
36 |
print(f"Error loading model: {e}")
|
37 |
self.pipeline = None
|
38 |
|
|
|
39 |
def synthesize_speech(self, text, reference_audio=None, reference_text=""):
|
40 |
"""
|
41 |
Synthesize speech from text using TaDiCodec TTS
|
|
|
4 |
import tempfile
|
5 |
import os
|
6 |
import warnings
|
7 |
+
import spaces
|
8 |
warnings.filterwarnings("ignore")
|
9 |
|
10 |
try:
|
|
|
37 |
print(f"Error loading model: {e}")
|
38 |
self.pipeline = None
|
39 |
|
40 |
+
@spaces.GPU(duration=120)
|
41 |
def synthesize_speech(self, text, reference_audio=None, reference_text=""):
|
42 |
"""
|
43 |
Synthesize speech from text using TaDiCodec TTS
|