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

trying to get my Piper voice in Android using SherpaOnnx. #699

Open
Sergiaws opened this issue Jan 13, 2025 · 5 comments
Open

trying to get my Piper voice in Android using SherpaOnnx. #699

Sergiaws opened this issue Jan 13, 2025 · 5 comments

Comments

@Sergiaws
Copy link

Hi! I managed to create a piper voice model of NokiaTTS syntesizer in Spanish. As a fact, is one of the fastest Piper models I got, same for other models like Keynote Gold and the voice of Windows XP Tour. As a consequence, I wanted to try to get them in my Android phone, but there's not a lot of documentation, or simply there's not a very good explanation like it did the person that made the tutorial of training Piper on WSL. As a consequence, I decided to try to decompile a voice (I decided to choose Glados) and I decided to change the voice in assets folder. What exactly I did was put the SherpaOnnx/Piper model with the json, .onnx and tokens file and tried to recompile. But apparently no result. Can someone help a bit in compilation step? BTW I suggest that there will be some day an app that allows you to load several piper voices in Android and choose between them. Is a nightmare compiling an app for just one model, and if you install other model the previous model is uninstalled.
Here is actually the apk of Glados voice I used for modification.
https://www.mediafire.com/file/unxjpgs12qr4tlf/sherpa-onnx-1.9.3-arm64-v8a-es-tts-vits-piper-es-glados-medium.apk/file
Here is actually the piper model with tokens.txt file.
https://www.mediafire.com/file/hpqq35rwwtgrpio/es-NokiaTTS-medium.zip/file
Here is the modded apk.
https://www.mediafire.com/file/xf4fsfzr6yg53ef/piper-es-NokiaTTS-medium.apk/file

@rmcpantoja
Copy link
Contributor

Hi,
Sherpa onnx has many unnecessary components apart of text-to-speech, which means the response time is too high for screen reader.
I remember someone did a prototype project to implement pure piper for Android what worked fast on Talkback, but the work seems to be paused.

Cheers.

@Sergiaws
Copy link
Author

Nice to know that. Would be fun to test that pure piper implementation with some voices. At least, I thought that using these retro tts models with piper it would have a bit less latency!
Cheers.

@ate864
Copy link

ate864 commented Jan 14, 2025

Maybe you whant to look at this ? https://github.com/jing332/SherpaOnnxTtsEngineAndroid

@csukuangfj
Copy link

Sherpa onnx has many unnecessary components apart of text-to-speech, which means the response time is too high for screen reader.

@rmcpantoja
Could you be more specific about the response time?

sherpa-onnx supports many functions apart from TTS. However, if you don't use the other functions at runtime, then your response time won't be affected. You don't pay for what you don't need.

@csukuangfj
Copy link

As a consequence, I decided to try to decompile a voice (I decided to choose Glados) and I decided to change the voice in assets folder. What exactly I did was put the SherpaOnnx/Piper model with the json, .onnx and tokens file and tried to recompile. But apparently no result.

@Sergiaws

You need to follow the following doc
https://k2-fsa.github.io/sherpa/onnx/tts/piper.html#add-meta-data-to-the-onnx-model
to add metadata to your .onnx model and then it can be used in sherpa-onnx.

If you have any further issues, i suggest that you create a ticket in sherpa-onnx's repo.

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

No branches or pull requests

4 participants