Skip to content

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
@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
@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
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[TTS] 粤语合成的 onnxruntime 推理加到 cli 里面 [TTS] 串通粤语模型的静态图推理流程和转 onnx、onnxruntime 推理流程
2 participants