Commit
·
a1f9bbc
1
Parent(s):
9edbe9d
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def create_spectrogram_and_get_info(audio_file):
|
|
42 |
|
43 |
# Create the spectrogram
|
44 |
plt.specgram(audio_data, Fs=sample_rate / 1, NFFT=4096, sides='onesided',
|
45 |
-
cmap="Reds_r", scale_by_freq=True, scale='dB', mode='magnitude')
|
46 |
|
47 |
# Save the spectrogram to a PNG file
|
48 |
plt.savefig('spectrogram.png')
|
@@ -83,4 +83,4 @@ def create_spectrogram_and_get_info(audio_file):
|
|
83 |
return info_table, 'spectrogram.png'
|
84 |
|
85 |
# Create the Gradio interface
|
86 |
-
main()
|
|
|
42 |
|
43 |
# Create the spectrogram
|
44 |
plt.specgram(audio_data, Fs=sample_rate / 1, NFFT=4096, sides='onesided',
|
45 |
+
cmap="Reds_r", scale_by_freq=True, scale='dB', mode='magnitude', window=np.hanning)
|
46 |
|
47 |
# Save the spectrogram to a PNG file
|
48 |
plt.savefig('spectrogram.png')
|
|
|
83 |
return info_table, 'spectrogram.png'
|
84 |
|
85 |
# Create the Gradio interface
|
86 |
+
main()
|