From 14a3536d778c7bdfc9f678836cb63a70f3170b35 Mon Sep 17 00:00:00 2001 From: Ali Abid Date: Tue, 12 Oct 2021 20:48:52 +0000 Subject: [PATCH] fix tests --- gradio/outputs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradio/outputs.py b/gradio/outputs.py index a9e5588b1c..01a842da37 100644 --- a/gradio/outputs.py +++ b/gradio/outputs.py @@ -361,7 +361,7 @@ class Audio(OutputComponent): if self.type in ["numpy", "file", "auto"]: if self.type == "numpy" or (self.type == "auto" and isinstance(y, tuple)): sample_rate, data = y - file = tempfile.NamedTemporaryFile(delete=False) + file = tempfile.NamedTemporaryFile(prefix="sample", suffix=".wav", delete=False) processing_utils.audio_to_file(sample_rate, data, file.name) y = file.name return processing_utils.encode_file_to_base64(y, type="audio", ext="wav")