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-09-07 11:29:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-09-07 11:29:00 +0800
Commit
ffeff3b8a3fdf695a318438d31f14c1d8246f171
ffeff3b8
1 parent
a0a747a0
Fix a typo for Go (#298)
隐藏空白字符变更
内嵌
并排对比
正在显示
14 个修改的文件
包含
33 行增加
和
145 行删除
.github/workflows/android.yaml
.github/workflows/arm-linux-gnueabihf.yaml
.github/workflows/build-xcframework.yaml
.github/workflows/dot-net.yaml
.github/workflows/jni.yaml
.github/workflows/linux-gpu.yaml
.github/workflows/linux.yaml
.github/workflows/macos.yaml
.github/workflows/mfc.yaml
.github/workflows/windows-x64-cuda.yaml
.github/workflows/windows-x64.yaml
.github/workflows/windows-x86.yaml
CMakeLists.txt
scripts/go/sherpa_onnx.go
.github/workflows/android.yaml
查看文件 @
ffeff3b
...
...
@@ -11,6 +11,8 @@ on:
-
'
sherpa-onnx/csrc/*'
-
'
sherpa-onnx/jni/*'
-
'
build-android*.sh'
tags
:
-
'
*'
pull_request
:
branches
:
-
master
...
...
@@ -22,10 +24,6 @@ on:
-
'
sherpa-onnx/jni/*'
-
'
build-android*.sh'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
...
...
@@ -112,7 +110,7 @@ jobs:
# https://huggingface.co/docs/hub/spaces-github-actions
-
name
:
Publish to huggingface
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' &&
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' &&
github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
run
:
|
...
...
@@ -136,7 +134,7 @@ jobs:
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
-
name
:
Release android libs
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/arm-linux-gnueabihf.yaml
查看文件 @
ffeff3b
...
...
@@ -11,6 +11,8 @@ on:
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
-
'
toolchains/arm-linux-gnueabihf.toolchain.cmake'
tags
:
-
'
*'
pull_request
:
branches
:
-
master
...
...
@@ -20,20 +22,8 @@ on:
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
-
'
toolchains/arm-linux-gnueabihf.toolchain.cmake'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
arm-linux-gnueabihf-${{ github.ref }}
...
...
@@ -131,7 +121,6 @@ jobs:
export PATH=$GITHUB_WORKSPACE/qemu-install/bin:$PATH
export QEMU_LD_PREFIX=$GITHUB_WORKSPACE/toolchain/arm-linux-gnueabihf/libc
ls -lh ./build-arm-linux-gnueabihf/bin
qemu-arm ./build-arm-linux-gnueabihf/bin/sherpa-onnx --help
...
...
@@ -156,7 +145,7 @@ jobs:
path
:
sherpa-onnx-*linux-arm-gnueabihf.tar.bz2
-
name
:
Release pre-compiled binaries and libs for arm linux gnueabihf
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/build-xcframework.yaml
查看文件 @
ffeff3b
...
...
@@ -14,15 +14,6 @@ on:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
build-xcframework-${{ github.ref }}
...
...
@@ -76,7 +67,7 @@ jobs:
# https://huggingface.co/docs/hub/spaces-github-actions
-
name
:
Publish to huggingface
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa'
&& github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
run
:
|
...
...
@@ -100,7 +91,7 @@ jobs:
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
-
name
:
Release xcframework
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/dot-net.yaml
查看文件 @
ffeff3b
...
...
@@ -6,20 +6,8 @@ on:
-
dot-net
tags
:
-
'
*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
dot-net-${{ github.ref }}
...
...
@@ -138,7 +126,7 @@ jobs:
path
:
scripts/dotnet/packages/*.nupkg
-
name
:
publish .Net packages to nuget.org
if
:
github.repository
== 'csukuangfj/sherpa-onnx' || github.repository == 'k2-fsa/sherpa-onnx'
if
:
github.repository
_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
env
:
API_KEY
:
${{ secrets.NUGET_API_KEY }}
...
...
@@ -148,7 +136,7 @@ jobs:
dotnet nuget push ./org.k2fsa.sherpa.onnx.*.nupkg --skip-duplicate --api-key $API_KEY --source https://api.nuget.org/v3/index.json
-
name
:
Release nuget packages
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/jni.yaml
查看文件 @
ffeff3b
...
...
@@ -22,6 +22,8 @@ on:
-
'
sherpa-onnx/csrc/*'
-
'
sherpa-onnx/jni/*'
workflow_dispatch
:
concurrency
:
group
:
jni-${{ github.ref }}
cancel-in-progress
:
true
...
...
.github/workflows/linux-gpu.yaml
查看文件 @
ffeff3b
...
...
@@ -30,20 +30,8 @@ on:
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
-
'
sherpa-onnx/c-api/*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
linux-gpu-${{ github.ref }}
...
...
@@ -136,7 +124,7 @@ jobs:
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
...
...
@@ -153,7 +141,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
-
name
:
Release pre-compiled binaries and libs for linux x64
if
:
env.RELEASE == 'true' && matrix.build_type == 'Release'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/linux.yaml
查看文件 @
ffeff3b
...
...
@@ -30,20 +30,8 @@ on:
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
-
'
sherpa-onnx/c-api/*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
linux-${{ github.ref }}
...
...
@@ -135,7 +123,7 @@ jobs:
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
...
...
@@ -152,7 +140,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
-
name
:
Release pre-compiled binaries and libs for linux x64
if
:
env.RELEASE == 'true' && matrix.build_type == 'Release'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/macos.yaml
查看文件 @
ffeff3b
...
...
@@ -4,6 +4,8 @@ on:
push
:
branches
:
-
master
tags
:
-
'
*'
paths
:
-
'
.github/workflows/macos.yaml'
-
'
.github/scripts/test-online-transducer.sh'
...
...
@@ -25,20 +27,8 @@ on:
-
'
CMakeLists.txt'
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
macos-${{ github.ref }}
...
...
@@ -133,7 +123,7 @@ jobs:
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
...
...
@@ -151,7 +141,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
-
name
:
Release pre-compiled binaries and libs for macOS
if
:
env.RELEASE == 'true' && matrix.build_type == 'Release'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/mfc.yaml
查看文件 @
ffeff3b
...
...
@@ -21,20 +21,8 @@ on:
-
'
cmake/**'
-
'
mfc-examples/**'
-
'
sherpa-onnx/csrc/*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
mfc-${{ github.ref }}
...
...
@@ -114,7 +102,7 @@ jobs:
path
:
./mfc-examples/${{ matrix.arch }}/Release/NonStreamingSpeechRecognition.exe
-
name
:
Release pre-compiled binaries and libs for Windows ${{ matrix.arch }}
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
@@ -122,7 +110,7 @@ jobs:
file
:
./mfc-examples/${{ matrix.arch }}/Release/sherpa-onnx-streaming-*.exe
-
name
:
Release pre-compiled binaries and libs for Windows ${{ matrix.arch }}
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/windows-x64-cuda.yaml
查看文件 @
ffeff3b
...
...
@@ -27,20 +27,8 @@ on:
-
'
CMakeLists.txt'
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
windows-x64-cuda-${{ github.ref }}
...
...
@@ -125,7 +113,7 @@ jobs:
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
...
...
@@ -140,7 +128,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
-
name
:
Release pre-compiled binaries and libs for Windows x64 CUDA
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/windows-x64.yaml
查看文件 @
ffeff3b
...
...
@@ -27,20 +27,8 @@ on:
-
'
CMakeLists.txt'
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
windows-x64-${{ github.ref }}
...
...
@@ -126,7 +114,7 @@ jobs:
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
...
...
@@ -141,7 +129,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
-
name
:
Release pre-compiled binaries and libs for Windows x64
if
:
env.RELEASE == 'true'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
.github/workflows/windows-x86.yaml
查看文件 @
ffeff3b
...
...
@@ -4,6 +4,8 @@ on:
push
:
branches
:
-
master
tags
:
-
'
*'
paths
:
-
'
.github/workflows/windows-x86.yaml'
-
'
.github/scripts/test-online-transducer.sh'
...
...
@@ -25,20 +27,8 @@ on:
-
'
CMakeLists.txt'
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
release
:
types
:
-
published
workflow_dispatch
:
inputs
:
release
:
description
:
"
Whether
to
release"
type
:
boolean
env
:
RELEASE
:
|-
# Release if there is a release tag name or a release flag in workflow_dispatch
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}
concurrency
:
group
:
windows-x86-${{ github.ref }}
...
...
@@ -124,7 +114,7 @@ jobs:
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
if
:
env.RELEASE == 'true' && matrix.vs-version == 'vs2015'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
...
...
@@ -139,7 +129,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
-
name
:
Release pre-compiled binaries and libs for Windows x86
if
:
env.RELEASE == 'true' && matrix.vs-version == 'vs2015'
if
:
github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
...
...
CMakeLists.txt
查看文件 @
ffeff3b
cmake_minimum_required
(
VERSION 3.13 FATAL_ERROR
)
project
(
sherpa-onnx
)
set
(
SHERPA_ONNX_VERSION
"1.7.1
1
"
)
set
(
SHERPA_ONNX_VERSION
"1.7.1
2
"
)
# Disable warning about
#
...
...
scripts/go/sherpa_onnx.go
查看文件 @
ffeff3b
...
...
@@ -407,7 +407,7 @@ func NewOfflineRecognizer(config *OfflineRecognizerConfig) *OfflineRecognizer {
c
.
model_config
.
whisper
.
decoder
=
C
.
CString
(
config
.
ModelConfig
.
Whisper
.
Decoder
)
defer
C
.
free
(
unsafe
.
Pointer
(
c
.
model_config
.
whisper
.
decoder
))
c
.
model_config
.
tdnn
.
decoder
=
C
.
CString
(
config
.
ModelConfig
.
Tdnn
.
Model
)
c
.
model_config
.
tdnn
.
model
=
C
.
CString
(
config
.
ModelConfig
.
Tdnn
.
Model
)
defer
C
.
free
(
unsafe
.
Pointer
(
c
.
model_config
.
tdnn
.
model
))
c
.
model_config
.
tokens
=
C
.
CString
(
config
.
ModelConfig
.
Tokens
)
...
...
请
注册
或
登录
后发表评论