Skip to content

Commit b640412

Browse files
committed
fixed outdated period transform in lpcnet_vocoding_dataset.py
1 parent 6c13100 commit b640412

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dnn/torch/osce/data/lpcnet_vocoding_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def getitem_v1(self, index):
203203

204204
# convert periods
205205
if 'periods' in self.input_features:
206-
sample['periods'] = (0.1 + 50 * sample['periods'] + 100).astype('int16')
206+
sample['periods'] = np.round(np.clip(256. / 2 ** (sample['periods'] + 1.5), 32, 255)).astype('int')
207207

208208
signal_start = (self.frame_offset + index * self.frames_per_sample) * self.frame_length
209209
signal_stop = (self.frame_offset + (index + 1) * self.frames_per_sample) * self.frame_length

0 commit comments

Comments
 (0)