Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TTS]add Cantonese onnxruntime Cli, test=tts #2990

Merged
merged 15 commits into from
Mar 6, 2023

Conversation

JiehangXie
Copy link
Contributor

@JiehangXie JiehangXie commented Mar 6, 2023

add Cantonese ONNX model and CLI
fix #2979
fix #2980

CLI:

paddlespeech tts --am fastspeech2_canton --voc pwgan_aishell3 --lang canton --spk_id 10 --input "各个国家有各个国家嘅国歌" --output test_cli.wav --use_onnx True

Python API:

from paddlespeech.cli.tts import TTSExecutor
import time

tts_executor = TTSExecutor()

time_1 = time.time()
wav_file = tts_executor(
    text='各个国家有各个国家嘅国歌',
    output='1.wav',
    am='fastspeech2_canton',
    voc='pwgan_aishell3',
    lang='canton',
    spk_id=10,
    use_onnx=True,
    cpu_threads=2)
time_2 = time.time()
print("time of first time:", time_2-time_1)
wav_file = tts_executor(
    text='各个国家有各个国家嘅国歌',
    output='2.wav',
    am='fastspeech2_canton',
    voc='pwgan_aishell3',
    lang='canton',
    spk_id=10,
    use_onnx=True,
    cpu_threads=2)
print("time of second time:", time.time()-time_2)

@paddle-bot
Copy link

paddle-bot bot commented Mar 6, 2023

Thanks for your contribution!

@JiehangXie JiehangXie changed the title Cli Cantonese onnx Cli Cantonese onnx, test=tts Mar 6, 2023
demos/text_to_speech/README.md Outdated Show resolved Hide resolved
demos/text_to_speech/README_cn.md Outdated Show resolved Hide resolved
paddlespeech/resource/pretrained_models.py Show resolved Hide resolved
@yt605155624 yt605155624 added this to the r1.4.0 milestone Mar 6, 2023
@yt605155624
Copy link
Collaborator

yt605155624 commented Mar 6, 2023

  1. examples/canton/tts3/run.sh 需要加上 stage 4 ~ stage 6
  2. examples/canton/tts3/README.md 新增静态图模型链接

@WongLaw WongLaw requested a review from yt605155624 March 6, 2023 03:10
@yt605155624 yt605155624 changed the title Cli Cantonese onnx, test=tts [TTS]Cli Cantonese onnx, test=tts Mar 6, 2023
@mergify mergify bot added the Example label Mar 6, 2023
examples/canton/tts3/local/paddle2onnx.sh Outdated Show resolved Hide resolved
examples/canton/tts3/run.sh Outdated Show resolved Hide resolved
@yt605155624
Copy link
Collaborator

  1. examples/canton/tts3/run.sh 需要加上 stage 4 ~ stage 6
  2. examples/canton/tts3/README.md 新增静态图模型链接

done

Copy link
Collaborator

@yt605155624 yt605155624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yt605155624 yt605155624 merged commit 59cabdc into PaddlePaddle:develop Mar 6, 2023
@yt605155624 yt605155624 changed the title [TTS]Cli Cantonese onnx, test=tts [TTS]add Cantonese onnxruntime Cli, test=tts Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment