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
2025-02-21 11:59:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-02-21 11:59:27 +0800
Commit
ed922e61b565789a6a67ba86012f519cc48aeb21
ed922e61
1 parent
9c810ce3
Fix publishing pre-built windows libraries (#1905)
显示空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
169 行增加
和
144 行删除
.github/scripts/test-offline-tts.sh
.github/workflows/windows-x64.yaml
.github/workflows/windows-x86.yaml
sherpa-onnx/csrc/offline-whisper-greedy-search-decoder.cc
.github/scripts/test-offline-tts.sh
查看文件 @
ed922e6
...
...
@@ -44,24 +44,24 @@ done
rm -rf kokoro-en-v0_19
log
"------------------------------------------------------------"
log
"matcha-tts-fa_en-m
ale
"
log
"matcha-tts-fa_en-m
usa
"
log
"------------------------------------------------------------"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-tts-fa_en-male.tar.bz2
tar xvf matcha-tts-fa_en-male.tar.bz2
rm matcha-tts-fa_en-male.tar.bz2
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-tts-fa_en-musa.tar.bz2
tar xvf matcha-tts-fa_en-musa.tar.bz2
rm matcha-tts-fa_en-musa.tar.bz2
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
$EXE
\
--matcha-acoustic-model
=
./matcha-tts-fa_en-m
ale
/model.onnx
\
--matcha-acoustic-model
=
./matcha-tts-fa_en-m
usa
/model.onnx
\
--matcha-vocoder
=
./hifigan_v2.onnx
\
--matcha-tokens
=
./matcha-tts-fa_en-male/tokens.txt
\
--matcha-data-dir
=
./matcha-tts-fa_en-male/espeak-ng-data
\
--output-filename
=
./tts/test-matcha-fa-en-male.wav
\
--matcha-tokens
=
./matcha-tts-fa_en-musa/tokens.txt
\
--matcha-data-dir
=
./matcha-tts-fa_en-musa/espeak-ng-data
\
--output-filename
=
./tts/test-matcha-fa-en-musa.wav
\
--num-threads
=
2
\
"How are you doing today? این یک نمونه ی تست فارسی است. This is a test."
rm -rf matcha-tts-fa_en-m
ale
rm -rf matcha-tts-fa_en-m
usa
rm hifigan_v2.onnx
ls -lh tts/
*
.wav
...
...
.github/workflows/windows-x64.yaml
查看文件 @
ed922e6
...
...
@@ -91,6 +91,83 @@ jobs:
name
:
release-windows-x64-${{ matrix.shared_lib }}-${{ matrix.with_tts }}
path
:
build/install/*
-
name
:
Copy files
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
shared_lib=${{ matrix.shared_lib }}
if [[ $shared_lib == "ON" ]]; then
suffix=shared
else
suffix=static
fi
if [[ ${{ matrix.with_tts }} == ON ]]; then
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-$suffix
else
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-$suffix-no-tts
fi
mkdir $dst
cp -a build/install/bin $dst/
cp -a build/install/lib $dst/
cp -a build/install/include $dst/
tar cjvf ${dst}.tar.bz2 $dst
# https://huggingface.co/docs/hub/spaces-github-actions
-
name
:
Publish to huggingface
if
:
(github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
uses
:
nick-fields/retry@v3
with
:
max_attempts
:
20
timeout_seconds
:
200
shell
:
bash
command
:
|
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
mkdir -p win64
cp -v ../sherpa-onnx-*.tar.bz2 ./win64
git status
git lfs track "*.bz2"
git add .
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
-
name
:
Release pre-compiled binaries and libs for Windows x64
if
:
github.repository_owner == 'csukuangfj' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
overwrite
:
true
file
:
sherpa-onnx-*-win-x64*.tar.bz2
repo_name
:
k2-fsa/sherpa-onnx
repo_token
:
${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
tag
:
v1.10.45
-
name
:
Release pre-compiled binaries and libs for Windows x64
if
:
github.repository_owner == 'k2-fsa'&& github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
overwrite
:
true
file
:
sherpa-onnx-*-win-x64*.tar.bz2
-
name
:
Test offline Moonshine for windows x64
shell
:
bash
run
:
|
...
...
@@ -224,69 +301,3 @@ jobs:
export EXE=decode-file-c-api.exe
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
shared_lib=${{ matrix.shared_lib }}
if [[ $shared_lib == "ON" ]]; then
suffix=shared
else
suffix=static
fi
if [[ ${{ matrix.with_tts }} ]]; then
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-$suffix
else
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x64-$suffix-no-tts
fi
mkdir $dst
cp -a build/install/bin $dst/
cp -a build/install/lib $dst/
cp -a build/install/include $dst/
tar cjvf ${dst}.tar.bz2 $dst
# https://huggingface.co/docs/hub/spaces-github-actions
-
name
:
Publish to huggingface
if
:
(github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
uses
:
nick-fields/retry@v3
with
:
max_attempts
:
20
timeout_seconds
:
200
shell
:
bash
command
:
|
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
mkdir -p win64
cp -v ../sherpa-onnx-*.tar.bz2 ./win64
git status
git lfs track "*.bz2"
git add .
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
-
name
:
Release pre-compiled binaries and libs for Windows x64
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
overwrite
:
true
file
:
sherpa-onnx-*-win-x64*.tar.bz2
...
...
.github/workflows/windows-x86.yaml
查看文件 @
ed922e6
...
...
@@ -91,6 +91,86 @@ jobs:
name
:
release-windows-x86-${{ matrix.shared_lib }}-${{ matrix.with_tts }}
path
:
build/install/*
-
name
:
Copy files
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x86
shared_lib=${{ matrix.shared_lib }}
if [[ $shared_lib == "ON" ]]; then
suffix=shared
else
suffix=static
fi
if [[ ${{ matrix.with_tts }} == ON ]]; then
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x86-$suffix
else
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x86-$suffix-no-tts
fi
mkdir $dst
cp -a build/install/bin $dst/
cp -a build/install/lib $dst/
cp -a build/install/include $dst/
tar cjvf ${dst}.tar.bz2 $dst
# https://huggingface.co/docs/hub/spaces-github-actions
-
name
:
Publish to huggingface
if
:
(github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
uses
:
nick-fields/retry@v3
with
:
max_attempts
:
20
timeout_seconds
:
200
shell
:
bash
command
:
|
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
mkdir -p win32
cp -v ../sherpa-onnx-*.tar.bz2 ./win32
git status
git lfs track "*.bz2"
git add .
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
-
name
:
Release pre-compiled binaries and libs for Windows x86
if
:
github.repository_owner == 'csukuangfj' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
overwrite
:
true
file
:
sherpa-onnx-*-win-x86*.tar.bz2
repo_name
:
k2-fsa/sherpa-onnx
repo_token
:
${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }}
tag
:
v1.10.45
-
name
:
Release pre-compiled binaries and libs for Windows x86
if
:
github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses
:
svenstaro/upload-release-action@v2
with
:
file_glob
:
true
overwrite
:
true
file
:
sherpa-onnx-*-win-x86*.tar.bz2
-
name
:
Test offline Moonshine for windows x86
shell
:
bash
run
:
|
...
...
@@ -223,72 +303,3 @@ jobs:
export EXE=decode-file-c-api.exe
.github/scripts/test-online-transducer.sh
-
name
:
Copy files
shell
:
bash
run
:
|
SHERPA_ONNX_VERSION=v$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x86
shared_lib=${{ matrix.shared_lib }}
if [[ $shared_lib == "ON" ]]; then
suffix=shared
else
suffix=static
fi
if [[ ${{ matrix.with_tts }} ]]; then
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x86-$suffix
else
dst=sherpa-onnx-${SHERPA_ONNX_VERSION}-win-x86-$suffix-no-tts
fi
mkdir $dst
cp -a build/install/bin $dst/
cp -a build/install/lib $dst/
cp -a build/install/include $dst/
tar cjvf ${dst}.tar.bz2 $dst
# https://huggingface.co/docs/hub/spaces-github-actions
-
name
:
Publish to huggingface
if
:
(github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
env
:
HF_TOKEN
:
${{ secrets.HF_TOKEN }}
uses
:
nick-fields/retry@v3
with
:
max_attempts
:
20
timeout_seconds
:
200
shell
:
bash
command
:
|
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
rm -rf huggingface
export GIT_CLONE_PROTECTION_ACTIVE=false
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-libs huggingface
cd huggingface
mkdir -p win32
cp -v ../sherpa-onnx-*.tar.bz2 ./win32
git status
git lfs track "*.bz2"
git add .
git commit -m "upload sherpa-onnx-${SHERPA_ONNX_VERSION}"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/sherpa-onnx-libs main
-
name
:
Release pre-compiled binaries and libs for Windows x86
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
overwrite
:
true
file
:
sherpa-onnx-*-win-x86*.tar.bz2
...
...
sherpa-onnx/csrc/offline-whisper-greedy-search-decoder.cc
查看文件 @
ed922e6
...
...
@@ -124,6 +124,9 @@ OfflineWhisperGreedySearchDecoder::Decode(Ort::Value cross_k,
std
::
get
<
5
>
(
decoder_out
).
GetTensorMutableData
<
int64_t
>
();
*
p_offset
+=
1
;
if
(
*
p_offset
>=
n_text_ctx
-
1
)
{
break
;
}
const
auto
&
logits
=
std
::
get
<
0
>
(
decoder_out
);
const
float
*
p_logits
=
logits
.
GetTensorData
<
float
>
();
...
...
请
注册
或
登录
后发表评论