Hard-coding the PICO tts Engine into an Android App
Hard-coding the PICO tts Engine into an Android App
I have been trying to include text-to-speech functionality in an app... where the app will automatically speak to the user in his or her preferred language (determined by system settings), but while I have a working version on IOS, this Android version has proven to be a major challenge due to the variance of behaviors between Android API levels and speech engines (google, samsung, pico), and also unknown runtime conditions (is internet on or off?)... are voice data packs installed or not etc. etc.?
So... I had an idea! Why not just include a speech engine in the app itself... which would mean we no longer have to worry about what engines the user is using or whether they are connected to the internet or not... or whether the user has a certain language installed, and we no longer have to cross our fingers and hope for the best when sending a speak command to the engine.
So the question:
Since it is available as open source, in Android, is it feasible to include the PICO text-to-speech engine "hard-coded" inside an app?
That is, NOT installed as a system service, or installed separately via a dialog from within the app... but actually "embedded" in the app as a stand-alone class or set of classes that exist side-by-side with all the other classes of the app?
So far I have taken a look at the source code and attempted to open it in Android Studio.
This didn't work very well yet... apparently it was not created with Gradle... and so I'm going to have to try to rebuild it. I have done this before with a different project, but it was 50% luck.
What I am assuming needs to happen:
1) Find the "core engine" code for PICO, and figure out how to graft it (error-free) into a new Android Studio project.
2) Figure out how to get the engine to run by itself without being "installed" as a system-wide text-to-speech engine.
3) Figure out how to pre-install/embed all language packs.
4) Build the "front-end" java to allow sending of speech commands to the engine.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Comments
Post a Comment