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-24 21:38:58 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-10-24 21:38:58 +0800
Commit
1249710e1df5c23cb12f4041c6c0e8d81fac63b7
1249710e
1 parent
789a8be7
support specifying speed for tts Python APIs (#384)
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
8 行增加
和
1 行删除
python-api-examples/offline-tts.py
python-api-examples/offline-tts.py
查看文件 @
1249710
...
...
@@ -95,6 +95,13 @@ def get_args():
)
parser
.
add_argument
(
"--speed"
,
type
=
float
,
default
=
1.0
,
help
=
"Speech speed. Larger->faster; smaller->slower"
,
)
parser
.
add_argument
(
"text"
,
type
=
str
,
help
=
"The input text to generate audio for"
,
...
...
@@ -122,7 +129,7 @@ def main():
tts
=
sherpa_onnx
.
OfflineTts
(
tts_config
)
start
=
time
.
time
()
audio
=
tts
.
generate
(
args
.
text
,
sid
=
args
.
sid
)
audio
=
tts
.
generate
(
args
.
text
,
sid
=
args
.
sid
,
speed
=
args
.
speed
)
end
=
time
.
time
()
if
len
(
audio
.
samples
)
==
0
:
...
...
请
注册
或
登录
后发表评论