Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
xuning
/
sherpaonnx
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Fangjun Kuang
2023-08-17 10:43:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-08-17 10:43:26 +0800
Commit
eb22b4845a048014d67ec2624ebcf48e5df8d0a0
eb22b484
1 parent
54eca59f
Fix a bug for multilingual ASR (#281)
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
5 行增加
和
3 行删除
CMakeLists.txt
sherpa-onnx/csrc/offline-whisper-greedy-search-decoder.cc
CMakeLists.txt
查看文件 @
eb22b48
cmake_minimum_required
(
VERSION 3.13 FATAL_ERROR
)
project
(
sherpa-onnx
)
set
(
SHERPA_ONNX_VERSION
"1.7.
8
"
)
set
(
SHERPA_ONNX_VERSION
"1.7.
9
"
)
# Disable warning about
#
...
...
sherpa-onnx/csrc/offline-whisper-greedy-search-decoder.cc
查看文件 @
eb22b48
...
...
@@ -136,8 +136,10 @@ OfflineWhisperGreedySearchDecoder::Decode(Ort::Value cross_k,
auto
logits_shape
=
logits
.
GetTensorTypeAndShapeInfo
().
GetShape
();
int32_t
vocab_size
=
logits_shape
[
2
];
int32_t
max_token_id
=
static_cast
<
int32_t
>
(
std
::
distance
(
p_logits
,
std
::
max_element
(
p_logits
,
p_logits
+
vocab_size
)));
const
float
*
p_start
=
p_logits
+
(
logits_shape
[
1
]
-
1
)
*
vocab_size
;
int32_t
max_token_id
=
static_cast
<
int32_t
>
(
std
::
distance
(
p_start
,
std
::
max_element
(
p_start
,
p_start
+
vocab_size
)));
int32_t
n_text_ctx
=
model_
->
TextCtx
();
...
...
请
注册
或
登录
后发表评论