Spaces:
Runtime error
Runtime error
TheStinger
commited on
Commit
•
457965a
1
Parent(s):
77be3e0
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ def create_spectrogram_and_get_info(audio_file):
|
|
51 |
if len(audio_data.shape) > 1:
|
52 |
audio_data = np.mean(audio_data, axis=1)
|
53 |
plt.specgram(audio_data, Fs=sample_rate / 1, NFFT=4096, sides='onesided',
|
54 |
-
cmap="
|
55 |
plt.savefig('spectrogram.png', dpi=300)
|
56 |
audio_info = sf.info(audio_file)
|
57 |
bit_depth = {'PCM_16': 16, 'FLOAT': 32}.get(audio_info.subtype, 0)
|
|
|
51 |
if len(audio_data.shape) > 1:
|
52 |
audio_data = np.mean(audio_data, axis=1)
|
53 |
plt.specgram(audio_data, Fs=sample_rate / 1, NFFT=4096, sides='onesided',
|
54 |
+
cmap="hsv", scale_by_freq=True, scale='dB', mode='magnitude', window=np.hanning(4096))
|
55 |
plt.savefig('spectrogram.png', dpi=300)
|
56 |
audio_info = sf.info(audio_file)
|
57 |
bit_depth = {'PCM_16': 16, 'FLOAT': 32}.get(audio_info.subtype, 0)
|