Wav_2_Mel / app.py
nakas's picture
Update app.py
38da35f
raw
history blame contribute delete
No virus
392 Bytes
import gradio as gr
import numpy as np
import librosa
# import the librosa library for converting audio to a Mel spectrogram image
def audio_to_mel(audio):
# convert the audio to a Mel spectrogram image using librosa
mel_spectrogram = librosa.feature.melspectrogram(audio)
return mel_spectrogram
# create the gradio app
app = gr.Interface(audio_to_mel, "audio", "image")
app.launch()