89da05ea9d6de97da9bd21949a26ceb0042ef361,pyannote/audio/features/with_librosa.py,LibrosaFeatureExtractor,__call__,#LibrosaFeatureExtractor#Any#,80
Before Change
try:
wav = item["wav"]
y, sample_rate, encoding = pysndfile.sndio.read(wav)
except IOError as e:
raise PyannoteFeatureExtractionError(e.message)
if np.any(np.isnan(y)):
uri = get_unique_identifier(item)
msg = "pysndfile output contains NaNs for file "{uri}"."
raise PyannoteFeatureExtractionError(msg.format(uri=uri))
// reshape before selecting channel
if len(y.shape) < 2:
y = y.reshape(-1, 1)
channel = item.get("channel", 1)
y = y[:, channel - 1]
data = self.process(y, sample_rate)
if np.any(np.isnan(data)):
After Change
// --- load audio file
y, sample_rate = read_audio(item,
sample_rate=self.sample_rate,
mono=True)
data = self.process(y, sample_rate)
if np.any(np.isnan(data)):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 29
Instances
Project Name: pyannote/pyannote-audio
Commit Name: 89da05ea9d6de97da9bd21949a26ceb0042ef361
Time: 2017-07-19
Author: hbredin@users.noreply.github.com
File Name: pyannote/audio/features/with_librosa.py
Class Name: LibrosaFeatureExtractor
Method Name: __call__
Project Name: pyannote/pyannote-audio
Commit Name: 89da05ea9d6de97da9bd21949a26ceb0042ef361
Time: 2017-07-19
Author: hbredin@users.noreply.github.com
File Name: pyannote/audio/features/with_yaafe.py
Class Name: YaafeFeatureExtractor
Method Name: __call__
Project Name: pyannote/pyannote-audio
Commit Name: 89da05ea9d6de97da9bd21949a26ceb0042ef361
Time: 2017-07-19
Author: hbredin@users.noreply.github.com
File Name: pyannote/audio/features/utils.py
Class Name: RawAudio
Method Name: __call__