fix a bug for wenet streaming model. (#1054)
* fix a bug for wenet streaming model. The chunk shift was wrong. See https://github.com/wenet-e2e/wenet/blob/main/runtime/core/decoder/asr_model.cc#L15 and https://github.com/wenet-e2e/wenet/blob/main/runtime/core/decoder/asr_model.cc#L28
This commit is contained in:
@@ -143,7 +143,7 @@ def main():
|
||||
(model.chunk_size - 1) * model.subsampling_factor + model.right_context + 1
|
||||
)
|
||||
chunk_length = int(chunk_length)
|
||||
chunk_shift = int(model.required_cache_size)
|
||||
chunk_shift = int(model.chunk_size * model.subsampling_factor)
|
||||
print(chunk_length, chunk_shift)
|
||||
|
||||
num_frames = x.shape[0]
|
||||
|
||||
Reference in New Issue
Block a user