Commit
·
3e41f57
1
Parent(s):
e7768d9
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def create_spectrogram_and_get_info(audio_file):
|
|
16 |
audio_data = audio_data.flatten() if len(audio_data.shape) > 1 else audio_data
|
17 |
|
18 |
# Create the spectrogram
|
19 |
-
plt.specgram(audio_data, Fs=sample_rate / 1, NFFT=4096, sides='
|
20 |
cmap="Reds_r", scale_by_freq=True, scale='dB', mode='magnitude')
|
21 |
|
22 |
# Save the spectrogram to a PNG file
|
|
|
16 |
audio_data = audio_data.flatten() if len(audio_data.shape) > 1 else audio_data
|
17 |
|
18 |
# Create the spectrogram
|
19 |
+
plt.specgram(audio_data, Fs=sample_rate / 1, NFFT=4096, sides='onesided',
|
20 |
cmap="Reds_r", scale_by_freq=True, scale='dB', mode='magnitude')
|
21 |
|
22 |
# Save the spectrogram to a PNG file
|