mishkal icon indicating copy to clipboard operation
mishkal copied to clipboard

Import Mishkal to Android

Open linuxscout opened this issue 9 years ago • 7 comments

We need to run Mishkal under Android, in order to use it to diacritize text before convert it to speech. Mishkal is a pure python program, How to run it under Android?

linuxscout avatar Nov 08 '15 06:11 linuxscout

why not to use the web service instead?

MagedSaeed avatar Mar 19 '19 20:03 MagedSaeed

We have already the web service. but we have not an android app.

linuxscout avatar Mar 20 '19 07:03 linuxscout

When I read this "issue", my first intuition was: Eh, since a Web API already exists, why not just make calls to it? Something this:

  • Start a local web server(1) on the Android device (if you want it to work offline).
  • Create an Android app(2) that makes HTTP requests to the locally running web server to vocalize text.
  • It's probably not the best way to "port" the project to mobile but it should work.

NOTES

  • (1) Using QPython should do it.

  • (2) Write a native app in Java? Or just turn/port the Web interface into a native app using something like React Native or maybe Weex (VueJS's counterpart).

  • I know your GUI is built on PyQt and maybe this suggestion is not what you're looking for, but BeeWare (or maybe another framework) sounds promising and would allow for a simple yet powerful way to support multiple platforms.

Disclaimer: I have not programmed in Python before.

djalilhebal avatar Mar 20 '19 21:03 djalilhebal

Great suggestion, I will try to work on, especially BeeWare

linuxscout avatar Mar 20 '19 21:03 linuxscout

Chaquopy is a Python SDK for Android it provides a Simple APIs for calling Python code from Java/Kotlin, and vice versa. it may be a good option.

Disclaimer: I didn't use it before

naskio avatar Jan 29 '22 16:01 naskio

I created this example repo where I used chaquopy for running mishkal in a native android app. Note: chaquopy is a commercial product but it can be used without a license (limited) or with a free license (for open source project - read more here)

screenshot

naskio avatar Jan 31 '22 14:01 naskio

Thank you Mehdi, it's a great contribution.

linuxscout avatar Jan 31 '22 18:01 linuxscout