mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
fix tests
This commit is contained in:
parent
5718a5dfc6
commit
14a3536d77
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user