Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def video_to_audio_and_speech(video: gr.Video, prompt: str, text: str, audio_pro
|
|
56 |
|
57 |
if isinstance(audio_prompt, tuple):
|
58 |
sr, data = audio_prompt
|
59 |
-
torchaudio.save(audio_p_path, torch.from_numpy(data.reshape(1,-1)/32768.0), sr)
|
60 |
elif audio_prompt.startswith("http"):
|
61 |
data = requests.get(audio_prompt, timeout=60).content
|
62 |
with open(audio_p_path, "wb") as fw:
|
|
|
56 |
|
57 |
if isinstance(audio_prompt, tuple):
|
58 |
sr, data = audio_prompt
|
59 |
+
torchaudio.save(audio_p_path, torch.from_numpy(data.reshape(1,-1)/32768.0).to(torch.float32), sr)
|
60 |
elif audio_prompt.startswith("http"):
|
61 |
data = requests.get(audio_prompt, timeout=60).content
|
62 |
with open(audio_p_path, "wb") as fw:
|