Fix flooring of the pitch period

Without the 0.1 bias, the rounding error could cause an offset of -1
This commit is contained in:
Jean-Marc Valin 2018-12-10 11:23:31 -05:00
parent d533e4024d
commit b9e0ea23e0
3 changed files with 4 additions and 4 deletions

View file

@ -59,7 +59,7 @@ pcm_chunk_size = frame_size*feature_chunk_size
features = np.reshape(features, (nb_frames, feature_chunk_size, nb_features))
features[:,:,18:36] = 0
periods = (50*features[:,:,36:37]+100).astype('int16')
periods = (.1 + 50*features[:,:,36:37]+100).astype('int16')