Skip to content

Commit

Permalink
Changed default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kahst committed Apr 9, 2018
1 parent 4051484 commit 67c18dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import cv2

def openAudioFile(path, sample_rate=48000, as_mono=True, mean_substract=False):
def openAudioFile(path, sample_rate=44100, as_mono=True, mean_substract=False):

# Open file with librosa (uses ffmpeg or libav)
sig, rate = librosa.load(path, sr=sample_rate, mono=as_mono)
Expand Down Expand Up @@ -134,7 +134,7 @@ def specsFromFile(path, rate, seconds, overlap, minlen, shape, start=-1, end=-1,

if __name__ == '__main__':

for spec in specsFromFile('../example/Acadian Flycatcher.wav', 48000, 1, 0, 1, shape=(128, 256), fmin=300, fmax=15000):
for spec in specsFromFile('../example/Acadian Flycatcher.wav', 44100, 1, 0, 1, shape=(128, 256), fmin=300, fmax=15000):

# Show spec and wait for enter key
cv2.imshow('SPEC', spec)
Expand Down

0 comments on commit 67c18dd

Please sign in to comment.