Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,6 @@ from styletts2 import tts
|
|
| 4 |
import re
|
| 5 |
import numpy as np
|
| 6 |
from scipy.io.wavfile import write
|
| 7 |
-
import pyaudio
|
| 8 |
import nltk
|
| 9 |
|
| 10 |
nltk.download('punkt')
|
|
@@ -173,8 +172,6 @@ def generate(audio_path, ins, speed, alpha, beta, embedding, steps=100):
|
|
| 173 |
texts = split_and_recombine_text(ins)
|
| 174 |
audio = np.array([])
|
| 175 |
|
| 176 |
-
P = pyaudio.PyAudio()
|
| 177 |
-
|
| 178 |
for i in texts:
|
| 179 |
i = text_to_phonemes(i)
|
| 180 |
synthaud, s_prev = other_tts.long_inference_segment(i, diffusion_steps=steps,
|
|
|
|
| 4 |
import re
|
| 5 |
import numpy as np
|
| 6 |
from scipy.io.wavfile import write
|
|
|
|
| 7 |
import nltk
|
| 8 |
|
| 9 |
nltk.download('punkt')
|
|
|
|
| 172 |
texts = split_and_recombine_text(ins)
|
| 173 |
audio = np.array([])
|
| 174 |
|
|
|
|
|
|
|
| 175 |
for i in texts:
|
| 176 |
i = text_to_phonemes(i)
|
| 177 |
synthaud, s_prev = other_tts.long_inference_segment(i, diffusion_steps=steps,
|