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-06-30 14:21:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2025-06-30 14:21:01 +0800
Commit
ea3e583ac94b17e3dc9d994347d313f6e343305d
ea3e583a
1 parent
046ce012
Fix static link without tts (#2328)
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
27 行增加
和
6 行删除
.github/workflows/pkg-config.yaml
cmake/sherpa-onnx-static-no-tts.pc.in
.github/workflows/pkg-config.yaml
查看文件 @
ea3e583
...
...
@@ -33,13 +33,14 @@ concurrency:
jobs
:
pkg_config
:
runs-on
:
${{ matrix.os }}
name
:
${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.lib_type }}
name
:
${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.lib_type }}
tts-${{ matrix.tts }}
strategy
:
fail-fast
:
false
matrix
:
os
:
[
ubuntu-latest
,
macos-latest
]
build_type
:
[
Release
,
Debug
]
lib_type
:
[
shared
,
static
]
tts
:
[
ON
,
OFF
]
steps
:
-
uses
:
actions/checkout@v4
...
...
@@ -67,12 +68,12 @@ jobs:
mkdir build
cd build
if [[ ${{ matrix.lib_type }} == "shared" ]]; then
cmake -DSHERPA_ONNX_ENABLE_C_API=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON ..
cmake -DSHERPA_ONNX_ENABLE_
TTS=${{ matrix.tts }} -DSHERPA_ONNX_ENABLE_
C_API=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON ..
else
cmake -DSHERPA_ONNX_ENABLE_C_API=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=OFF ..
cmake -DSHERPA_ONNX_ENABLE_
TTS=${{ matrix.tts }} -DSHERPA_ONNX_ENABLE_
C_API=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=OFF ..
fi
-
name
:
Build sherpa-onnx for ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.lib_type }}
-
name
:
Build sherpa-onnx for ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.lib_type }}
tts-${{ matrix.tts }}
shell
:
bash
run
:
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
...
...
@@ -104,16 +105,36 @@ jobs:
cat build/install/sherpa-onnx.pc
-
name
:
Show pkg-config
shell
:
bash
run
:
|
export PKG_CONFIG_PATH=$PWD/build/install:$PKG_CONFIG_PATH
pkg-config --cflags sherpa-onnx
pkg-config --libs sherpa-onnx
-
name
:
Build C API example
shell
:
bash
run
:
|
export PKG_CONFIG_PATH=$PWD/build/install:$PKG_CONFIG_PATH
cd c-api-examples
pkg-config --cflags sherpa-onnx
gcc -o decode-file-c-api $(pkg-config --cflags sherpa-onnx) ./decode-file-c-api.c $(pkg-config --libs sherpa-onnx)
./decode-file-c-api --help
-
name
:
Build C API example (tts)
if
:
matrix.tts == 'ON'
shell
:
bash
run
:
|
export PKG_CONFIG_PATH=$PWD/build/install:$PKG_CONFIG_PATH
cd c-api-examples
pkg-config --cflags sherpa-onnx
gcc -o offline-tts-c-api $(pkg-config --cflags sherpa-onnx) ./offline-tts-c-api.c $(pkg-config --libs sherpa-onnx)
./offline-tts-c-api --help
-
name
:
Test online transducer (C API)
...
...
@@ -126,5 +147,5 @@ jobs:
-
uses
:
actions/upload-artifact@v4
with
:
name
:
tts-generated-test-files-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.lib_type }}
name
:
tts-generated-test-files-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.lib_type }}
-tts-${{ matrix.tts }}
path
:
tts
...
...
cmake/sherpa-onnx-static-no-tts.pc.in
查看文件 @
ea3e583
...
...
@@ -22,4 +22,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 -lkissfft-float -lonnxruntime -lssentencepiece_core -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
far -lsherpa-onnx-fst
-lkaldi-native-fbank-core -lkissfft-float -lonnxruntime -lssentencepiece_core -Wl,-rpath,${libdir} @SHERPA_ONNX_PKG_WITH_CARGS@ @SHERPA_ONNX_PKG_CONFIG_EXTRA_LIBS@
...
...
请
注册
或
登录
后发表评论