Skip to content

Commit 8aef0c7

Browse files
authored
Allow up to 30 seconds ASR for sense-voice on Ascend NPU (#2729)
1 parent ea7206f commit 8aef0c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sherpa-onnx/csrc/ascend/offline-sense-voice-model-ascend.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ class OfflineSenseVoiceModelAscend::Impl {
140140
}
141141

142142
void Preallocate() {
143-
max_num_frames_ = (10 * 100 - 7) / 6 + 1;
143+
// max 30 seconds
144+
max_num_frames_ = (30 * 100 - 7) / 6 + 1;
144145
x_ptr_ = std::make_unique<AclDevicePtr>(max_num_frames_ * feat_dim_ *
145146
sizeof(float));
146147

0 commit comments

Comments
 (0)