Spaces:
Running
Running
vineelpratap
commited on
Commit
•
1073464
1
Parent(s):
2fd6d82
Update tts.py
Browse files
tts.py
CHANGED
@@ -9,6 +9,7 @@ import tempfile
|
|
9 |
import torch
|
10 |
import sys
|
11 |
import gradio as gr
|
|
|
12 |
|
13 |
from huggingface_hub import hf_hub_download
|
14 |
|
@@ -167,7 +168,8 @@ def synthesize(text, lang, speed=None):
|
|
167 |
.numpy()
|
168 |
)
|
169 |
|
170 |
-
|
|
|
171 |
|
172 |
|
173 |
TTS_EXAMPLES = [
|
|
|
9 |
import torch
|
10 |
import sys
|
11 |
import gradio as gr
|
12 |
+
import numpy as np
|
13 |
|
14 |
from huggingface_hub import hf_hub_download
|
15 |
|
|
|
168 |
.numpy()
|
169 |
)
|
170 |
|
171 |
+
hyp = (hyp * 32768).astype(np.int16)
|
172 |
+
return (hps.data.sampling_rate, hyp), text
|
173 |
|
174 |
|
175 |
TTS_EXAMPLES = [
|