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
2024-05-23 14:49:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2024-05-23 14:49:37 +0800
Commit
2db777587e12870be5bb3842a50fb5a00a3ae8ce
2db77758
1 parent
49ee458b
Fix CI tests. (#907)
显示空白字符变更
内嵌
并排对比
正在显示
6 个修改的文件
包含
49 行增加
和
5 行删除
cmake/cmake_extension.py
cmake/sherpa-onnx-no-tts.pc.in
cmake/sherpa-onnx.pc.in
sherpa-onnx/csrc/offline-recognizer-paraformer-impl.h
sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OfflineModelConfig.java
sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OnlineModelConfig.java
cmake/cmake_extension.py
查看文件 @
2db7775
...
...
@@ -80,6 +80,7 @@ def get_binaries():
"kaldi-decoder-core.dll"
,
"kaldi-native-fbank-core.dll"
,
"onnxruntime.dll"
,
"ssentencepiece_core.dll"
,
"piper_phonemize.dll"
,
"sherpa-onnx-c-api.dll"
,
"sherpa-onnx-core.dll"
,
...
...
cmake/sherpa-onnx-no-tts.pc.in
查看文件 @
2db7775
...
...
@@ -13,4 +13,4 @@ Cflags: -I"${includedir}"
# Note: -lcargs is required only for the following file
# https://github.com/k2-fsa/sherpa-onnx/blob/master/c-api-examples/decode-file-c-api.c
# We add it here so that users don't need to specify -lcargs when compiling decode-file-c-api.c
Libs: -L"${libdir}" -lsherpa-onnx-c-api -lsherpa-onnx-core -lkaldi-decoder-core -lsherpa-onnx-kaldifst-core -lsherpa-onnx-fst -lkaldi-native-fbank-core -lonnxruntime -Wl,-rpath,${libdir} @SHERPA_ONNX_PKG_WITH_CARGS@ @SHERPA_ONNX_PKG_CONFIG_EXTRA_LIBS@
Libs: -L"${libdir}" -lsherpa-onnx-c-api -lsherpa-onnx-core -lkaldi-decoder-core -lsherpa-onnx-kaldifst-core -lsherpa-onnx-fst -lkaldi-native-fbank-core -lonnxruntime -
lssentencepiece_core -
Wl,-rpath,${libdir} @SHERPA_ONNX_PKG_WITH_CARGS@ @SHERPA_ONNX_PKG_CONFIG_EXTRA_LIBS@
...
...
cmake/sherpa-onnx.pc.in
查看文件 @
2db7775
...
...
@@ -13,4 +13,4 @@ Cflags: -I"${includedir}"
# Note: -lcargs is required only for the following file
# https://github.com/k2-fsa/sherpa-onnx/blob/master/c-api-examples/decode-file-c-api.c
# We add it here so that users don't need to specify -lcargs when compiling decode-file-c-api.c
Libs: -L"${libdir}" -lsherpa-onnx-c-api -lsherpa-onnx-core -lkaldi-decoder-core -lsherpa-onnx-kaldifst-core -lsherpa-onnx-fstfar -lsherpa-onnx-fst -lkaldi-native-fbank-core -lpiper_phonemize -lespeak-ng -lucd -lonnxruntime -Wl,-rpath,${libdir} @SHERPA_ONNX_PKG_WITH_CARGS@ @SHERPA_ONNX_PKG_CONFIG_EXTRA_LIBS@
Libs: -L"${libdir}" -lsherpa-onnx-c-api -lsherpa-onnx-core -lkaldi-decoder-core -lsherpa-onnx-kaldifst-core -lsherpa-onnx-fstfar -lsherpa-onnx-fst -lkaldi-native-fbank-core -lpiper_phonemize -lespeak-ng -lucd -lonnxruntime -
lssentencepiece_core -
Wl,-rpath,${libdir} @SHERPA_ONNX_PKG_WITH_CARGS@ @SHERPA_ONNX_PKG_CONFIG_EXTRA_LIBS@
...
...
sherpa-onnx/csrc/offline-recognizer-paraformer-impl.h
查看文件 @
2db7775
...
...
@@ -59,9 +59,9 @@ static OfflineRecognitionResult Convert(
mergeable
=
false
;
if
(
i
>
0
)
{
const
uint8_t
*
p
=
reinterpret_cast
<
const
uint8_t
*>
(
sym_table
[
src
.
tokens
[
i
-
1
]].
c_str
());
if
(
p
[
0
]
<
0x80
)
{
const
uint8_t
p
=
reinterpret_cast
<
const
uint8_t
*>
(
sym_table
[
src
.
tokens
[
i
-
1
]].
c_str
())[
0
];
if
(
p
<
0x80
)
{
// put a space between ascii and non-ascii
text
.
append
(
" "
);
}
...
...
sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OfflineModelConfig.java
查看文件 @
2db7775
...
...
@@ -13,6 +13,8 @@ public class OfflineModelConfig {
private
final
String
provider
;
private
final
String
modelType
;
private
final
String
modelingUnit
;
private
final
String
bpeVocab
;
private
OfflineModelConfig
(
Builder
builder
)
{
this
.
transducer
=
builder
.
transducer
;
...
...
@@ -24,6 +26,8 @@ public class OfflineModelConfig {
this
.
debug
=
builder
.
debug
;
this
.
provider
=
builder
.
provider
;
this
.
modelType
=
builder
.
modelType
;
this
.
modelingUnit
=
builder
.
modelingUnit
;
this
.
bpeVocab
=
builder
.
bpeVocab
;
}
public
static
Builder
builder
()
{
...
...
@@ -62,6 +66,13 @@ public class OfflineModelConfig {
return
modelType
;
}
public
String
getModelingUnit
()
{
return
modelingUnit
;
}
public
String
getBpeVocab
()
{
return
bpeVocab
;
}
public
static
class
Builder
{
private
OfflineParaformerModelConfig
paraformer
=
OfflineParaformerModelConfig
.
builder
().
build
();
...
...
@@ -73,6 +84,8 @@ public class OfflineModelConfig {
private
boolean
debug
=
true
;
private
String
provider
=
"cpu"
;
private
String
modelType
=
""
;
private
String
modelingUnit
=
"cjkchar"
;
private
String
bpeVocab
=
""
;
public
OfflineModelConfig
build
()
{
return
new
OfflineModelConfig
(
this
);
...
...
@@ -122,5 +135,13 @@ public class OfflineModelConfig {
this
.
modelType
=
modelType
;
return
this
;
}
public
void
setModelingUnit
(
String
modelingUnit
)
{
this
.
modelingUnit
=
modelingUnit
;
}
public
void
setBpeVocab
(
String
bpeVocab
)
{
this
.
bpeVocab
=
bpeVocab
;
}
}
}
\ No newline at end of file
...
...
sherpa-onnx/java-api/src/com/k2fsa/sherpa/onnx/OnlineModelConfig.java
查看文件 @
2db7775
...
...
@@ -13,6 +13,8 @@ public class OnlineModelConfig {
private
final
boolean
debug
;
private
final
String
provider
;
private
final
String
modelType
;
private
final
String
modelingUnit
;
private
final
String
bpeVocab
;
private
OnlineModelConfig
(
Builder
builder
)
{
this
.
transducer
=
builder
.
transducer
;
...
...
@@ -24,6 +26,8 @@ public class OnlineModelConfig {
this
.
debug
=
builder
.
debug
;
this
.
provider
=
builder
.
provider
;
this
.
modelType
=
builder
.
modelType
;
this
.
modelingUnit
=
builder
.
modelingUnit
;
this
.
bpeVocab
=
builder
.
bpeVocab
;
}
public
static
Builder
builder
()
{
...
...
@@ -66,6 +70,14 @@ public class OnlineModelConfig {
return
modelType
;
}
public
String
getModelingUnit
()
{
return
modelingUnit
;
}
public
String
getBpeVocab
()
{
return
bpeVocab
;
}
public
static
class
Builder
{
private
OnlineParaformerModelConfig
paraformer
=
OnlineParaformerModelConfig
.
builder
().
build
();
private
OnlineTransducerModelConfig
transducer
=
OnlineTransducerModelConfig
.
builder
().
build
();
...
...
@@ -76,6 +88,8 @@ public class OnlineModelConfig {
private
boolean
debug
=
true
;
private
String
provider
=
"cpu"
;
private
String
modelType
=
""
;
private
String
modelingUnit
=
"cjkchar"
;
private
String
bpeVocab
=
""
;
public
OnlineModelConfig
build
()
{
return
new
OnlineModelConfig
(
this
);
...
...
@@ -125,5 +139,13 @@ public class OnlineModelConfig {
this
.
modelType
=
modelType
;
return
this
;
}
public
void
setModelingUnit
(
String
modelingUnit
)
{
this
.
modelingUnit
=
modelingUnit
;
}
public
void
setBpeVocab
(
String
bpeVocab
)
{
this
.
bpeVocab
=
bpeVocab
;
}
}
}
...
...
请
注册
或
登录
后发表评论