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
longshiming
2023-11-07 14:18:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
GitHub
2023-11-07 14:18:18 +0800
Commit
10d6dba1871a88dd01a63079fb57f9351c6c87b0
10d6dba1
1 parent
a65cdc3d
add --tts-rule-fsts argument at offline-tts.py (#413)
Co-authored-by: longshiming <longshiming@greesoft.com>
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
25 行增加
和
1 行删除
python-api-examples/offline-tts.py
python-api-examples/offline-tts.py
查看文件 @
10d6dba
...
...
@@ -21,6 +21,22 @@ python3 ./python-api-examples/offline-tts.py \
--output-filename=./generated.wav
\
'liliana, the most beautiful and lovely assistant of our team!'
2. Download a model
wget https://huggingface.co/csukuangfj/vits-zh-aishell3/resolve/main/vits-aishell3.onnx
wget https://huggingface.co/csukuangfj/vits-zh-aishell3/resolve/main/lexicon.txt
wget https://huggingface.co/csukuangfj/vits-zh-aishell3/resolve/main/tokens.txt
wget https://huggingface.co/csukuangfj/vits-zh-aishell3/resolve/main/rule.fst
python3 ./python-api-examples/offline-tts.py
--vits-model=./vits-aishell3.onnx
\
--vits-lexicon=./lexicon.txt
\
--vits-tokens=./tokens.txt
\
--tts-rule-fsts=./rule.fst
\
--sid=21
\
--output-filename=./liubei-21.wav
\
"勿以恶小而为之,勿以善小而不为。惟贤惟德,能服于人。122334"
Please see
https://k2-fsa.github.io/sherpa/onnx/tts/index.html
for details.
...
...
@@ -57,6 +73,13 @@ def get_args():
)
parser
.
add_argument
(
"--tts-rule-fsts"
,
type
=
str
,
default
=
""
,
help
=
"Path to rule.fst"
,
)
parser
.
add_argument
(
"--output-filename"
,
type
=
str
,
default
=
"./generated.wav"
,
...
...
@@ -124,7 +147,8 @@ def main():
provider
=
args
.
provider
,
debug
=
args
.
debug
,
num_threads
=
args
.
num_threads
,
)
),
rule_fsts
=
args
.
tts_rule_fsts
)
tts
=
sherpa_onnx
.
OfflineTts
(
tts_config
)
...
...
请
注册
或
登录
后发表评论