gradio/demo/reverse_audio/run.py
2022-02-08 13:56:13 -05:00

15 lines
248 B
Python

import numpy as np
import gradio as gr
def reverse_audio(audio):
sr, data = audio
return (sr, np.flipud(data))
iface = gr.Interface(reverse_audio, "microphone", "audio", examples="audio")
if __name__ == "__main__":
iface.launch()