Created
October 30, 2019 04:18
-
-
Save grohith327/0e6b2071b8e3f57961a24d06c495fe33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import librosa | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import librosa.display | |
data, sr = librosa.load('Dataset/decrease_volume/1.wav') | |
D = np.abs(librosa.stft(data)) | |
plt.figure(figsize=(20,8)) | |
librosa.display.specshow(librosa.amplitude_to_db(D,ref=np.max),y_axis='log', x_axis='time') | |
plt.title('Spectrogram') | |
plt.colorbar(format='%+2.0f dB') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment