Skip to content

Commit

Permalink
Warning on empty wav.
Browse files Browse the repository at this point in the history
  • Loading branch information
oadams committed Oct 13, 2018
1 parent 4f4ea60 commit 23027a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions persephone/preprocess/feat_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def fbank(wav_path, flat=True):
""" Currently grabs log Mel filterbank, deltas and double deltas."""

(rate, sig) = wav.read(wav_path)
import pdb; pdb.set_trace()
if len(sig) == 0:
logger.warning("Empty wav: {}".format(wav_path))
fbank_feat = python_speech_features.logfbank(sig, rate, nfilt=40)
energy = extract_energy(rate, sig)
feat = np.hstack([energy, fbank_feat])
Expand Down

0 comments on commit 23027a6

Please sign in to comment.