Changeset 1dfe409 for python/tests/utils.py
- Timestamp:
- Mar 31, 2019, 11:12:40 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
- Children:
- 76b6dd3
- Parents:
- 08246ee (diff), f55630c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/utils.py
r08246ee r1dfe409 2 2 3 3 import os 4 import re 4 5 import glob 5 6 import numpy as np … … 78 79 total_files += 1 79 80 return total_files 81 82 def parse_file_samplerate(soundfile): 83 samplerate = None 84 # parse samplerate 85 re_sr = re.compile(r'/([0-9]{4,})Hz_.*') 86 match_samplerate = re_sr.findall(soundfile) 87 if match_samplerate: 88 samplerate = int(match_samplerate[0]) 89 else: 90 import warnings 91 warnings.warn(UserWarning("could not parse samplerate for {:s}" 92 .format(soundfile))) 93 return samplerate
Note: See TracChangeset
for help on using the changeset viewer.