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-12-10 18:25:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-12-10 18:25:50 +0800
Commit
80d01923257f9177370ab66bfec948fb8f46b946
80d01923
1 parent
0f053d80
Fix android tts audio buffer size and fix CI. (#478)
显示空白字符变更
内嵌
并排对比
正在显示
11 个修改的文件
包含
21 行增加
和
12 行删除
.github/workflows/apk-tts.yaml
.github/workflows/test-build-wheel.yaml
.github/workflows/test-go.yaml
.github/workflows/test-pip-install.yaml
android/SherpaOnnxTts/app/src/main/java/com/k2fsa/sherpa/onnx/MainActivity.kt
scripts/apk/generate-tts-apk-script.py
scripts/go/_internal/.gitignore
scripts/go/_internal/non-streaming-tts/run-vits-ljs.sh
scripts/go/_internal/non-streaming-tts/run-vits-piper-en_US-lessac-medium.sh
scripts/go/_internal/non-streaming-tts/run-vits-vctk.sh
scripts/go/_internal/non-streaming-tts/run-vits-zh-aishell3.sh
.github/workflows/apk-tts.yaml
查看文件 @
80d0192
...
...
@@ -26,8 +26,8 @@ jobs:
fail-fast
:
false
matrix
:
os
:
[
ubuntu-latest
]
total
:
[
"
30"
]
index
:
[
"
0"
,
"
1"
,
"
2"
,
"
3"
,
"
4"
,
"
5"
,
"
6"
,
"
7"
,
"
8"
,
"
9"
,
"
10"
,
"
11"
,
"
12"
,
"
13"
,
"
14"
,
"
15"
,
"
16"
,
"
17"
,
"
18"
,
"
19"
,
"
20"
,
"
21"
,
"
22"
,
"
23"
,
"
24"
,
"
25"
,
"
26"
,
"
27"
,
"
28"
,
"
29"
]
total
:
[
"
40"
]
index
:
[
"
0"
,
"
1"
,
"
2"
,
"
3"
,
"
4"
,
"
5"
,
"
6"
,
"
7"
,
"
8"
,
"
9"
,
"
10"
,
"
11"
,
"
12"
,
"
13"
,
"
14"
,
"
15"
,
"
16"
,
"
17"
,
"
18"
,
"
19"
,
"
20"
,
"
21"
,
"
22"
,
"
23"
,
"
24"
,
"
25"
,
"
26"
,
"
27"
,
"
28"
,
"
29"
,
"
30"
,
"
31"
,
"
32"
,
"
33"
,
"
34"
,
"
35"
,
"
36"
,
"
37"
,
"
38"
,
"
39"
]
steps
:
-
uses
:
actions/checkout@v4
...
...
.github/workflows/test-build-wheel.yaml
查看文件 @
80d0192
...
...
@@ -74,7 +74,7 @@ jobs:
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
export PATH=/c/hostedtoolcache/windows/Python/3.11.
7
/x64/bin:$PATH
which sherpa-onnx
sherpa-onnx --help
...
...
.github/workflows/test-go.yaml
查看文件 @
80d0192
...
...
@@ -65,8 +65,6 @@ jobs:
run
:
|
mkdir tts-waves
cp -v go-api-examples/non-streaming-tts/*.sh scripts/go/_internal/non-streaming-tts/
cd scripts/go/_internal/non-streaming-tts/
ls -lh
go mod tidy
...
...
@@ -106,8 +104,6 @@ jobs:
-
name
:
Test non-streaming decoding files (macOS)
shell
:
bash
run
:
|
cp -v go-api-examples/non-streaming-decode-files/*.sh scripts/go/_internal/non-streaming-decode-files/
cd scripts/go/_internal/non-streaming-decode-files/
ls -lh
go mod tidy
...
...
@@ -148,7 +144,6 @@ jobs:
-
name
:
Test streaming decoding files
shell
:
bash
run
:
|
cp -v go-api-examples/streaming-decode-files/*.sh scripts/go/_internal/streaming-decode-files
cd scripts/go/_internal/streaming-decode-files
ls -lh
go mod tidy
...
...
.github/workflows/test-pip-install.yaml
查看文件 @
80d0192
...
...
@@ -66,7 +66,7 @@ jobs:
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
export PATH=/c/hostedtoolcache/windows/Python/3.11.
7
/x64/bin:$PATH
sherpa-onnx --help
...
...
android/SherpaOnnxTts/app/src/main/java/com/k2fsa/sherpa/onnx/MainActivity.kt
查看文件 @
80d0192
...
...
@@ -61,7 +61,11 @@ class MainActivity : AppCompatActivity() {
private fun initAudioTrack() {
val sampleRate = tts.sampleRate()
val bufLength = (sampleRate * 0.1).toInt()
val bufLength = AudioTrack.getMinBufferSize(
sampleRate,
AudioFormat.CHANNEL_OUT_MONO,
AudioFormat.ENCODING_PCM_FLOAT
)
Log.i(TAG, "sampleRate: ${sampleRate}, buffLength: ${bufLength}")
val attr = AudioAttributes.Builder().setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
...
...
scripts/apk/generate-tts-apk-script.py
查看文件 @
80d0192
...
...
@@ -250,11 +250,16 @@ def main():
start
=
index
*
num_per_runner
end
=
start
+
num_per_runner
if
index
==
args
.
total
-
1
:
end
=
num_models
remaining
=
num_models
-
args
.
total
*
num_per_runner
print
(
f
"{index}/{total}: {start}-{end}/{num_models}"
)
d
[
"tts_model_list"
]
=
all_model_list
[
start
:
end
]
if
index
<
remaining
:
s
=
args
.
total
*
num_per_runner
+
index
d
[
"tts_model_list"
]
.
append
(
all_model_list
[
s
])
print
(
f
"{s}/{num_models}"
)
s
=
template
.
render
(
**
d
)
with
open
(
"./build-apk-tts.sh"
,
"w"
)
as
f
:
print
(
s
,
file
=
f
)
...
...
scripts/go/_internal/.gitignore
0 → 100644
查看文件 @
80d0192
!*.sh
...
...
scripts/go/_internal/non-streaming-tts/run-vits-ljs.sh
0 → 120000
查看文件 @
80d0192
../../../../go-api-examples/non-streaming-tts/run-vits-ljs.sh
\ No newline at end of file
...
...
scripts/go/_internal/non-streaming-tts/run-vits-piper-en_US-lessac-medium.sh
0 → 120000
查看文件 @
80d0192
../../../../go-api-examples/non-streaming-tts/run-vits-piper-en_US-lessac-medium.sh
\ No newline at end of file
...
...
scripts/go/_internal/non-streaming-tts/run-vits-vctk.sh
0 → 120000
查看文件 @
80d0192
../../../../go-api-examples/non-streaming-tts/run-vits-vctk.sh
\ No newline at end of file
...
...
scripts/go/_internal/non-streaming-tts/run-vits-zh-aishell3.sh
0 → 120000
查看文件 @
80d0192
../../../../go-api-examples/non-streaming-tts/run-vits-zh-aishell3.sh
\ No newline at end of file
...
...
请
注册
或
登录
后发表评论