Skip to content

Commit

Permalink
replace deprecated function 'logamplitude' to 'power_to_db' (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
taira120 authored and louiskirsch committed Feb 1, 2019
1 parent 5ea7b3e commit e68dc77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speecht/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def calc_power_spectrogram(audio_data, samplerate, n_mels=128, n_fft=512, hop_le
spectrogram = librosa.feature.melspectrogram(audio_data, sr=samplerate, n_mels=n_mels, n_fft=n_fft, hop_length=hop_length)

# convert to log scale (dB)
log_spectrogram = librosa.logamplitude(spectrogram, ref_power=np.max)
log_spectrogram = librosa.power_to_db(spectrogram, ref=np.max)

# normalize
normalized_spectrogram = normalize(log_spectrogram)
Expand Down

0 comments on commit e68dc77

Please sign in to comment.