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

Add Matcha-TTS #1773

Merged
merged 27 commits into from
Oct 29, 2024
Merged

Add Matcha-TTS #1773

merged 27 commits into from
Oct 29, 2024

Conversation

csukuangfj
Copy link
Collaborator

@csukuangfj csukuangfj commented Oct 16, 2024

Note that it does not depend on lightning and it does not use *.yaml files for config.

TODOs

  • Refactor the phonemizer part. Use piper-phonemizer
  • Refactor the dataset part. Use lhotse for that
  • Support exporting to onnx and deployment in sherpa-onnx.
  • Specifically, we should support returning each token's timestamp and generated audio.
  • Remove unused code and fix code style issues.

The commit
seems to be working. You can find the checkpoint epoch-140.pt at
https://huggingface.co/csukuangfj/tmp-files/tree/main/icefall-pr-1173/1

It can generate audible speech at epoch-140 with only 2 ODE steps

0.mov
1.mov

@csukuangfj csukuangfj changed the title WIP: Add Matcha-TTS Add Matcha-TTS Oct 29, 2024
@csukuangfj
Copy link
Collaborator Author

Checkpoints and logs are available at
https://huggingface.co/csukuangfj/icefall-tts-ljspeech-matcha-en-2024-10-28

The following is a sample wave generated with the ONNX models exported from this PR.

python3 ./matcha/onnx_pretrained.py \
 --acoustic-model ./model-steps-6.onnx \
 --vocoder ./hifigan_v1.onnx \
 --tokens ./data/tokens.txt \
 --input-text "Ask not what your country can do for you; ask what you can do for your country." \
 --output-wav ./matcha-epoch-4000-step6-hfigian-v1.wav
matcha-epoch-4000-step6-hfigian-v1.mov

Please refer to the README.md of this PR for usage.

@csukuangfj csukuangfj requested a review from JinZr October 29, 2024 04:42
@JinZr
Copy link
Collaborator

JinZr commented Oct 29, 2024 via email

Copy link
Collaborator

@JinZr JinZr left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@csukuangfj csukuangfj merged commit 516b486 into k2-fsa:master Oct 29, 2024
8 checks passed
@csukuangfj csukuangfj deleted the matcha-tts branch October 29, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants