Spaces:
Running
Running
osanseviero
commited on
Commit
•
3cf4a2b
1
Parent(s):
9cb3054
Add FFT and spectrograms sections
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +21 -0
- cinematic/audio.wav +0 -0
- cinematic/fft.png +0 -0
- cinematic/mel_spectrogram.png +0 -0
- cinematic/spectrogram.png +0 -0
- evil-laugh/fft.png +0 -0
- evil-laugh/mel_spectrogram.png +0 -0
- evil-laugh/spectrogram.png +0 -0
- foo.png +0 -0
- forest/fft.png +0 -0
- forest/mel_spectrogram.png +0 -0
- forest/spectrogram.png +0 -0
- knocking/fft.png +0 -0
- knocking/mel_spectrogram.png +0 -0
- knocking/spectrogram.png +0 -0
- morning/fft.png +0 -0
- morning/mel_spectrogram.png +0 -0
- morning/spectrogram.png +0 -0
- speaker/fft.png +0 -0
- speaker/mel_spectrogram.png +0 -0
- speaker/spectrogram.png +0 -0
- swoosh/fft.png +0 -0
- swoosh/mel_spectrogram.png +0 -0
- swoosh/spectrogram.png +0 -0
- test.wav +0 -0
__pycache__/app.cpython-310.pyc
CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -79,7 +79,28 @@ In this section, we'll look into the waveforms of multiple audios.
|
|
79 |
fig.savefig('foo.png')
|
80 |
return "test.wav", fig
|
81 |
button.click(plot_sine, inputs=[freq, freq2, amplitude], outputs=[audio, plots])
|
|
|
|
|
|
|
|
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
if __name__ == '__main__':
|
85 |
demo.launch(debug=True)
|
|
|
79 |
fig.savefig('foo.png')
|
80 |
return "test.wav", fig
|
81 |
button.click(plot_sine, inputs=[freq, freq2, amplitude], outputs=[audio, plots])
|
82 |
+
with gr.Tab("Spectrograms and Mel Spectrograms"):
|
83 |
+
gr.Markdown("""## Waveforms
|
84 |
+
|
85 |
+
In this section, we'll look into the waveforms of multiple audios.
|
86 |
|
87 |
+
""")
|
88 |
+
for title, path in audios:
|
89 |
+
with gr.Row():
|
90 |
+
with gr.Column(scale=1):
|
91 |
+
gr.Markdown(f"### {title}")
|
92 |
+
with gr.Column(scale=10):
|
93 |
+
gr.Image(value=f"{path}/waveform.png")
|
94 |
+
with gr.Column(scale=10):
|
95 |
+
gr.Image(value=f"{path}/fft.png")
|
96 |
+
with gr.Column(scale=10):
|
97 |
+
video = gr.Video(value=f"{path}/waveform_video.mp4")
|
98 |
+
with gr.Row():
|
99 |
+
with gr.Column(scale=5):
|
100 |
+
gr.Image(value=f"{path}/spectrogram.png")
|
101 |
+
with gr.Column(scale=5):
|
102 |
+
gr.Image(value=f"{path}/mel_spectrogram.png")
|
103 |
+
|
104 |
|
105 |
if __name__ == '__main__':
|
106 |
demo.launch(debug=True)
|
cinematic/audio.wav
ADDED
Binary file (160 kB). View file
|
|
cinematic/fft.png
ADDED
cinematic/mel_spectrogram.png
ADDED
cinematic/spectrogram.png
ADDED
evil-laugh/fft.png
ADDED
evil-laugh/mel_spectrogram.png
ADDED
evil-laugh/spectrogram.png
ADDED
foo.png
CHANGED
forest/fft.png
ADDED
forest/mel_spectrogram.png
ADDED
forest/spectrogram.png
ADDED
knocking/fft.png
ADDED
knocking/mel_spectrogram.png
ADDED
knocking/spectrogram.png
ADDED
morning/fft.png
ADDED
morning/mel_spectrogram.png
ADDED
morning/spectrogram.png
ADDED
speaker/fft.png
ADDED
speaker/mel_spectrogram.png
ADDED
speaker/spectrogram.png
ADDED
swoosh/fft.png
ADDED
swoosh/mel_spectrogram.png
ADDED
swoosh/spectrogram.png
ADDED
test.wav
CHANGED
Binary files a/test.wav and b/test.wav differ
|
|