gradio/demo/reverse_audio.py

12 lines
245 B
Python
Raw Normal View History

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))
iface = gr.Interface(reverse_audio, "microphone", "audio", examples="audio")
2020-08-28 23:56:03 +08:00
2020-11-11 22:15:53 +08:00
if __name__ == "__main__":
iface.launch()