Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,8 +8,8 @@ import scipy
|
|
8 |
def TTS(text):
|
9 |
model = VitsModel.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
10 |
tokenizer = AutoTokenizer.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
11 |
-
inputs = tokenizer(text, return_tensors="pt")
|
12 |
-
|
13 |
with torch.no_grad():
|
14 |
output = model(**inputs).waveform
|
15 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
|
|
8 |
def TTS(text):
|
9 |
model = VitsModel.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
10 |
tokenizer = AutoTokenizer.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
11 |
+
#inputs = tokenizer(text, return_tensors="pt")
|
12 |
+
inputs = tokenizer(text)
|
13 |
with torch.no_grad():
|
14 |
output = model(**inputs).waveform
|
15 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|