-
Notifications
You must be signed in to change notification settings - Fork 124
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
Can I help to add Chinese lip sync for this project? #82
Comments
If you're interested in contributing, you can start by reading the Appendix C: Create A New Lip-sync Module. Creating a new lip-sync module is quite straightforward for phonetically orthographic languages, like Finnish, in which most letters represent specific phonemes. However, as you well know, Chinese is morphosyllabic, not phonetically orthographic, and very different from English too, so the approaches used in the currently available lip-sync modules might not be the best place to start. Therefore, if you don't already have a clear idea of how to do words-to-visemes conversion in Chinese, take your time and perhaps see how others have approached that specific task in other similar projects. Once you have a new lip-sync module file for Chinese, e.g. "lipsync-zh.mjs," you can open a new Pull Request, and I can help you finalize and test it. I don't speak Chinese, so I'm unable to give you advice on the pre-processor method or the actual words-to-visemes conversion, but otherwise, I'm happy to answer questions and help where I can. |
Thank you for those information, I'll look into it. I also found that the Google TTS is not the best option for the Chinese language. Could we support edgeTTS easily? |
Edge TTS is essentially a wrapper that calls Microsoft's undocumented WebSocket API for the Azure TTS service while pretending to be an Edge browser and using Microsoft's internal client token. Technically, you could make Edge TTS work with TalkingHead by setting the Note that if you decide to use the official Microsoft Azure TTS, you don't need to create a new lip-sync module, as Azure can provide viseme IDs directly. This feature is also supported in Chinese. I just tried the voice "zh-CN-XiaoxiaoNeural," and the lip-sync worked without any changes. You can find a code example of how to use Azure TTS (Microsoft Speech SDK) with TalkingHead class in the test app |
Wow, if "zh-CN-XiaoxiaoNeural" works directly, do you mind adding a minimal example code for the usage of Azure and Chinese? Thanks! |
Yes, the TalkingHead Azure TTS can provide viseme IDs for over a hundred different languages or dialects. Chinese is just one of them and works exactly the same way as any other language, so I see no need for a Chinese-specific example. As an example of how to use Azure in your app, you can use the test app ( If you don't know where to start, here's a rough outline: 1) Include Microsoft Speech SDK to your app from a CDN (see index.htm, line 403), 2) Copy-paste the "// Speak using Microsoft" section from the test app (includes the |
Thanks for detailed introduction. Moreover, as I know, like Azure, the AWS polly tts service outputs viseme as well: https://docs.aws.amazon.com/polly/latest/dg/viseme.html |
You are right, Amazon Polly can also output visemes. I always forget it because I have never used it myself. Thank you! |
If so, what should I do?
The text was updated successfully, but these errors were encountered: