Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -179,9 +179,9 @@ def generate(audio_path, ins, speed, alpha, beta, embedding, steps=100):
|
|
| 179 |
embedding_scale=embedding, prev_s=s_prev, ref_s=ref_s,
|
| 180 |
speed=speed, t=0.7)
|
| 181 |
audio = np.concatenate((audio, synthaud))
|
| 182 |
-
|
| 183 |
|
| 184 |
-
|
| 185 |
|
| 186 |
if torch.cuda.is_available():
|
| 187 |
other_tts = tts.StyleTTS2(model_checkpoint_path='./epoch_2nd_00012.pth', config_path="models/config_ft.yml")
|
|
|
|
| 179 |
embedding_scale=embedding, prev_s=s_prev, ref_s=ref_s,
|
| 180 |
speed=speed, t=0.7)
|
| 181 |
audio = np.concatenate((audio, synthaud))
|
| 182 |
+
scaled = np.int16(audio / np.max(np.abs(audio)) * 32767)
|
| 183 |
|
| 184 |
+
return 24000, scaled
|
| 185 |
|
| 186 |
if torch.cuda.is_available():
|
| 187 |
other_tts = tts.StyleTTS2(model_checkpoint_path='./epoch_2nd_00012.pth', config_path="models/config_ft.yml")
|