Dr. Richard Zinck commited on
Commit
5b6d5de
1 Parent(s): e7bac24
Files changed (1) hide show
  1. bat_ident.py +2 -2
bat_ident.py CHANGED
@@ -195,7 +195,7 @@ def get_raw_audio_from_file(fpath: str):
195
  The signal split into a list of chunks.
196
  """
197
  # Open file
198
- sig, rate = audio.openAudioFile(fpath, cfg.SAMPLE_RATE)
199
 
200
  # Split into raw audio chunks
201
  chunks = audio.splitSignal(sig, rate, cfg.SIG_LENGTH, cfg.SIG_OVERLAP, cfg.SIG_MINLEN)
@@ -246,7 +246,7 @@ def analyze_file(item):
246
 
247
  try:
248
  # Open audio file and split into 3-second chunks
249
- chunks = get_raw_audio_from_file(fpath,duration=2)
250
 
251
  # If no chunks, show error and skip
252
  except Exception as ex:
 
195
  The signal split into a list of chunks.
196
  """
197
  # Open file
198
+ sig, rate = audio.openAudioFile(fpath, cfg.SAMPLE_RATE,0.0,2)
199
 
200
  # Split into raw audio chunks
201
  chunks = audio.splitSignal(sig, rate, cfg.SIG_LENGTH, cfg.SIG_OVERLAP, cfg.SIG_MINLEN)
 
246
 
247
  try:
248
  # Open audio file and split into 3-second chunks
249
+ chunks = get_raw_audio_from_file(fpath)
250
 
251
  # If no chunks, show error and skip
252
  except Exception as ex: