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-10-19 10:43:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-10-19 10:43:14 +0800
Commit
eead16e27ff74ba23e5d0ff44c5ce87c8afdce0c
eead16e2
1 parent
33ad3fa6
Fix CI for pip install (#371)
隐藏空白字符变更
内嵌
并排对比
正在显示
8 个修改的文件
包含
36 行增加
和
11 行删除
.github/workflows/run-java-test.yaml
.github/workflows/run-python-test.yaml
.github/workflows/style_check.yaml
.github/workflows/test-pip-install.yaml
.github/workflows/test-python-offline-websocket-server.yaml
.github/workflows/test-python-online-websocket-server.yaml
sherpa-onnx/c-api/c-api.h
sherpa-onnx/csrc/offline-tts-vits-impl.h
.github/workflows/run-java-test.yaml
查看文件 @
eead16e
...
...
@@ -21,6 +21,7 @@ on:
-
'
java-api-examples/**'
-
'
sherpa-onnx/csrc/*'
-
'
sherpa-onnx/jni/*'
workflow_dispatch
:
concurrency
:
group
:
run-java-test-${{ github.ref }}
...
...
.github/workflows/run-python-test.yaml
查看文件 @
eead16e
...
...
@@ -19,6 +19,7 @@ on:
-
'
CMakeLists.txt'
-
'
cmake/**'
-
'
sherpa-onnx/csrc/*'
workflow_dispatch
:
concurrency
:
group
:
run-python-test-${{ github.ref }}
...
...
.github/workflows/style_check.yaml
查看文件 @
eead16e
...
...
@@ -29,6 +29,7 @@ on:
paths
:
-
'
.github/workflows/style_check.yaml'
-
'
sherpa-onnx/**'
workflow_dispatch
:
concurrency
:
group
:
style_check-${{ github.ref }}
...
...
.github/workflows/test-pip-install.yaml
查看文件 @
eead16e
...
...
@@ -12,6 +12,7 @@ on:
# day of the week (0-6)
# nightly build at 23:50 UTC time every day
-
cron
:
"
50
23
*
*
*"
workflow_dispatch
:
concurrency
:
group
:
test-pip-install-${{ github.ref }}
...
...
@@ -29,9 +30,12 @@ jobs:
matrix
:
os
:
[
ubuntu-latest
,
windows-latest
,
macos-latest
]
python-version
:
[
"
3.7"
,
"
3.8"
,
"
3.9"
,
"
3.10"
,
"
3.11"
]
exclude
:
-
os
:
macos-latest
python-version
:
"
3.7"
steps
:
-
uses
:
actions/checkout@v
2
-
uses
:
actions/checkout@v
3
with
:
fetch-depth
:
0
...
...
@@ -51,8 +55,23 @@ jobs:
python3 -c "import sherpa_onnx; print(sherpa_onnx.__file__)"
python3 -c "import sherpa_onnx; print(sherpa_onnx.__version__)"
p=$(python3 -c "from pathlib import Path; import sys; print(Path(sys.executable).parent)")
echo $p
ls -lh $p
# ls -lh $p/bin
# export PATH=$p/bin:$PATH
# For windows
export PATH=/c/hostedtoolcache/windows/Python/3.7.9/x64/bin:$PATH
export PATH=/c/hostedtoolcache/windows/Python/3.8.10/x64/bin:$PATH
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH
export PATH=/c/hostedtoolcache/windows/Python/3.11.6/x64/bin:$PATH
sherpa-onnx --help
sherpa-onnx-offline --help
sherpa-onnx-offline-tts --help
sherpa-onnx-microphone --help
sherpa-onnx-microphone-offline --help
...
...
.github/workflows/test-python-offline-websocket-server.yaml
查看文件 @
eead16e
...
...
@@ -7,6 +7,7 @@ on:
pull_request
:
branches
:
-
master
workflow_dispatch
:
concurrency
:
group
:
python-offline-websocket-server-${{ github.ref }}
...
...
.github/workflows/test-python-online-websocket-server.yaml
查看文件 @
eead16e
...
...
@@ -7,6 +7,7 @@ on:
pull_request
:
branches
:
-
master
workflow_dispatch
:
concurrency
:
group
:
python-online-websocket-server-${{ github.ref }}
...
...
sherpa-onnx/c-api/c-api.h
查看文件 @
eead16e
...
...
@@ -22,6 +22,11 @@ extern "C" {
// We will set SHERPA_ONNX_BUILD_SHARED_LIBS and SHERPA_ONNX_BUILD_MAIN_LIB in
// CMakeLists.txt
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wattributes"
#endif
#if defined(_WIN32)
#if defined(SHERPA_ONNX_BUILD_SHARED_LIBS)
#define SHERPA_ONNX_EXPORT __declspec(dllexport)
...
...
@@ -31,15 +36,7 @@ extern "C" {
#define SHERPA_ONNX_IMPORT
#endif
#else // WIN32
#if __APPLE__
// it throws a warning on macOS when using
// __attribute__((visibility("default")))
//
// warning: 'visibility' attribute ignored [-Wignored-attributes]
#define SHERPA_ONNX_EXPORT
#else
#define SHERPA_ONNX_EXPORT __attribute__((visibility("default")))
#endif // __APPLE__
#define SHERPA_ONNX_IMPORT SHERPA_ONNX_EXPORT
#endif // WIN32
...
...
@@ -598,6 +595,10 @@ SHERPA_ONNX_API void SherpaOnnxDestroySpeechSegment(
SHERPA_ONNX_API
void
SherpaOnnxVoiceActivityDetectorReset
(
SherpaOnnxVoiceActivityDetector
*
p
);
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif
#ifdef __cplusplus
}
/* extern "C" */
#endif
...
...
sherpa-onnx/csrc/offline-tts-vits-impl.h
查看文件 @
eead16e
...
...
@@ -30,7 +30,7 @@ class OfflineTtsVitsImpl : public OfflineTtsImpl {
SHERPA_ONNX_LOGE
(
"This is a single-speaker model and supports only sid 0. Given sid: "
"%d"
,
s
id
);
s
tatic_cast
<
int32_t
>
(
sid
)
);
return
{};
}
...
...
@@ -38,7 +38,7 @@ class OfflineTtsVitsImpl : public OfflineTtsImpl {
SHERPA_ONNX_LOGE
(
"This model contains only %d speakers. sid should be in the range "
"[%d, %d]. Given: %d"
,
num_speakers
,
0
,
num_speakers
-
1
,
s
id
);
num_speakers
,
0
,
num_speakers
-
1
,
s
tatic_cast
<
int32_t
>
(
sid
)
);
return
{};
}
...
...
请
注册
或
登录
后发表评论