Skip to content

Commit a3bac19

Browse files
authored
1 parent 1f95bff commit a3bac19

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/test-build-wheel.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
133133
export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH
134134
export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH
135-
export PATH=/c/hostedtoolcache/windows/Python/3.12.3/x64/bin:$PATH
135+
export PATH=/c/hostedtoolcache/windows/Python/3.12.4/x64/bin:$PATH
136136
137137
which sherpa-onnx
138138
sherpa-onnx --help

.github/workflows/test-pip-install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
108108
export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH
109109
export PATH=/c/hostedtoolcache/windows/Python/3.11.9/x64/bin:$PATH
110-
export PATH=/c/hostedtoolcache/windows/Python/3.12.3/x64/bin:$PATH
110+
export PATH=/c/hostedtoolcache/windows/Python/3.12.4/x64/bin:$PATH
111111
112112
sherpa-onnx --help
113113
sherpa-onnx-keyword-spotter --help

scripts/wenet/test-onnx-streaming.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def main():
143143
(model.chunk_size - 1) * model.subsampling_factor + model.right_context + 1
144144
)
145145
chunk_length = int(chunk_length)
146-
chunk_shift = int(model.required_cache_size)
146+
chunk_shift = int(model.chunk_size * model.subsampling_factor)
147147
print(chunk_length, chunk_shift)
148148

149149
num_frames = x.shape[0]

sherpa-onnx/csrc/online-wenet-ctc-model.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ class OnlineWenetCtcModel::Impl {
9797
right_context_ + 1;
9898
}
9999

100-
int32_t ChunkShift() const { return required_cache_size_; }
100+
int32_t ChunkShift() const {
101+
return config_.wenet_ctc.chunk_size * subsampling_factor_;
102+
}
101103

102104
OrtAllocator *Allocator() const { return allocator_; }
103105

0 commit comments

Comments
 (0)