-
Notifications
You must be signed in to change notification settings - Fork 450
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
Replace Android system TTS engine #508
Conversation
I can't seem to figure how to build this pull request. It gives this error specifically: Is this an issue with me or perhaps an issue with the Package directive? |
Looks like you are using windows. That file is a symlink. Please delete that file and use the real file to replace it. Windows does not support symlinks. |
By the way, we don't hard-code a model in the code since we try to support as many models as possible. You need to change the code to select a model. The following is an example: diff --git a/android/SherpaOnnxTtsEngine/app/src/main/java/com/k2fsa/sherpa/onnx/tts/engine/TtsEngine.kt b/android/SherpaOnnxTtsEngine/app/src/main/java/com/k2fsa/sherpa/onnx/tts/engine/TtsEngine.kt
index 4fc935b..52626e1 100644
--- a/android/SherpaOnnxTtsEngine/app/src/main/java/com/k2fsa/sherpa/onnx/tts/engine/TtsEngine.kt
+++ b/android/SherpaOnnxTtsEngine/app/src/main/java/com/k2fsa/sherpa/onnx/tts/engine/TtsEngine.kt
@@ -60,12 +60,12 @@ object TtsEngine {
// The purpose of such a design is to make the CI test easier
// Please see
// https://github.com/k2-fsa/sherpa-onnx/blob/master/scripts/apk/generate-tts-apk-script.py
- modelDir = null
- modelName = null
+ modelDir = "vits-piper-en_GB-southern_english_female-low"
+ modelName = "en_GB-southern_english_female-low.onnx"
ruleFsts = null
lexicon = null
- dataDir = null
- lang = null
+ dataDir = "vits-piper-en_GB-southern_english_female-low/espeak-ng-data"
+ lang = "eng" We give several detailed examples in the code. Please do read them before you build an APK. |
Oh I see I did see those, though it seems I assumed that it would automatically swap out the details when built. I'll change that now, thank you. |
It seems so so close, to functioning. I am getting this error which if i'm interpretting correctly means that it doesnt function with my two phones chipset? logcat:
It does this in a loop. Im going to try rebuilt with a different app build. |
https://k2-fsa.github.io/sherpa/onnx/tts/apk-engine.html The above page contains TTS engine APKs for different languages. |
You have done incredible mate. This is simply exactly what I have been wanting. I have lots of difficulty reading and the other tts options seem to be challenging to read along side. This though is awesome. I cannot express how greatful I am. I hope my persistent communication hasnt been difficult. You're a legend. |
I LOVE it, would you please to consider to mantain a repo for F-Droid? |
Please see #520 Users from the community are supporting it. |
You can find two demo videos below:
The following two repositories are used as a reference during implementation:
Note that you can use all supported models with this PR, e.g., models from piper and coqui-ai/TTS, etc.
Fixes #488
See also
rhasspy/piper#257 (comment)
@Pantyhose-X
@christiankaye
@ekorn
@LuekWasHere
@beqabeqa473
@paolo-caroni