gradio/demo/reverse_audio.py

16 lines
237 B
Python
Raw Normal View History

2020-08-22 05:20:05 +08:00
# Demo: (Audio) -> (Audio)
2020-08-06 01:42:52 +08:00
import gradio as gr
import numpy as np
2020-08-28 23:56:03 +08:00
2020-08-06 01:42:52 +08:00
def reverse_audio(audio):
sr, data = audio
return (sr, np.flipud(data))
2020-08-28 23:56:03 +08:00
io = gr.Interface(reverse_audio, "microphone", "audio")
io.test_launch()
io.launch()