ref: b64041270050d5a84e22fa3df0b3166edef810ea
parent: 6c13100fa8237eafbd7eeda5e5b678a7fe30bc02
author: Jan Buethe <jan.buethe@googlemail.com>
date: Thu Jun 26 07:14:06 EDT 2025
fixed outdated period transform in lpcnet_vocoding_dataset.py
--- a/dnn/torch/osce/data/lpcnet_vocoding_dataset.py
+++ b/dnn/torch/osce/data/lpcnet_vocoding_dataset.py
@@ -203,7 +203,7 @@
# convert periods
if 'periods' in self.input_features:
- sample['periods'] = (0.1 + 50 * sample['periods'] + 100).astype('int16')
+ sample['periods'] = np.round(np.clip(256. / 2 ** (sample['periods'] + 1.5), 32, 255)).astype('int')
signal_start = (self.frame_offset + index * self.frames_per_sample) * self.frame_length
signal_stop = (self.frame_offset + (index + 1) * self.frames_per_sample) * self.frame_length
--
⑨