Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def whisper_speech_demo(text, lang, speaker_audio, mix_lang, mix_text):
|
|
39 |
audio_np = audio_np / np.max(np.abs(audio_np))
|
40 |
audio_np = np.asarray(audio_np, dtype=np.float32)
|
41 |
with tempfile.NamedTemporaryFile(suffix='.wav', delete=False) as tmp_file:
|
42 |
-
sf.write(tmp_file.name,
|
43 |
return tmp_file.name
|
44 |
|
45 |
with gr.Blocks() as demo:
|
|
|
39 |
audio_np = audio_np / np.max(np.abs(audio_np))
|
40 |
audio_np = np.asarray(audio_np, dtype=np.float32)
|
41 |
with tempfile.NamedTemporaryFile(suffix='.wav', delete=False) as tmp_file:
|
42 |
+
sf.write(tmp_file.name, audio_np, 24000, format='WAV', subtype='PCM_16')
|
43 |
return tmp_file.name
|
44 |
|
45 |
with gr.Blocks() as demo:
|