niedev / RTranslator

Open source real-time translation app for Android that runs locally
Apache License 2.0
4.56k stars 342 forks source link

Add to F-Droid #9

Open takiainen opened 1 week ago

takiainen commented 1 week ago

F-Droid is an installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. Any chance of adding this project to F-Droid?

https://f-droid.org/

niedev commented 1 week ago

In these days I will find out more about the policies of F-Droid and update you here, because I don't know if I still can, given that NLLB is open source but not commercial, and Ml-Kit (used for language recognition in WalkieTalkie mode) is closed source, but if I can I will definitely do it.

jermanuts commented 1 week ago

Hey @IzzySoft, what do you think?

IzzySoft commented 1 week ago

MLKit is a show-stopper for F-Droid. The APK size is a show-stopper for IzzyOnDroid unfortunately, so we don't even need to raise the MLKit question there, sorry.

niedev commented 1 week ago

@IzzySoft Ok, no problem, maybe in the future I will reduce the APK size and find an open-source alternative to ML-Kit.

IzzySoft commented 1 week ago

Please let me know if you succeed with either! Especially the latter would be helping several projects. And there it would be helpful what areas the replacement(s) you found cover, so they can be matched to a project's need. Like with Supabase and appwrite as possible replacements for Firebase. Or UnifiedPush for FCM :wink:

That said: Best luck!

niedev commented 1 week ago

Thank you! I will do my best

chameleon-lizard commented 1 week ago

I didn't look at your code yet, but aren't there any open source models for language recognition, which would make this translator absolutely free? Quick search through huggingface gave me this, wouldn't it work?

I would be happy to contribute if this module is written in python, since I don't know much java.

niedev commented 1 week ago

Thank you! I did some research about it a while ago, it seems I missed this one 😅, it seems very good in quality, even if a bit big (about 200M parameters), anyway, I will test it well (quality, RAM consumption, execution time) and I will evaluate whether to insert it instead of ML-Kit. The license is the same as NLLB, @IzzySoft F-Droid accept AI models with cc-by-nc licence?

As for the app, it uses only Java code and a little bit of C++ (the percentage of Python shown by GitHub statistics are from the sentencepiece library, like most of the C++ code), but the inference logic with Java is quite simple, the complex part is mainly the conversion and optimization of the neural network models in onnx format.

IzzySoft commented 1 week ago

cc-by-nc licence?

The NC is the culprit there, as it violates one of the 4 essential freedoms of free software. So rather not I'd say.

niedev commented 1 week ago

Ok 👍 Thank you!

noctux commented 1 week ago

Hmm, I'm not sure how strict that posture is. whoBird is practically in the same boat with RTranslator as it seems. From the project's github page:

This app is built on the BirdNET framework by @kahst, published under CC BY NC SA 4.0 license At first start it downloads the BirdNet TFLite library from whoBird-TFlite, which is published under CC BY NC SA 4.0 license

Nevertheless it is available in FDroid with appropriate antifeature markers (Non-Free Assets, Non-Free Network Services). The model is not distributed with the apk but downloaded on first run.

(Please note that this is just an observation from a bystander, I've not researched whether there were any additional considerations involved during whoBIRD's admission process).

luisvalenzuelar commented 1 week ago

F-Droid is an installable catalogue of FOSS (Free and Open Source Software) applications for the Android platform. Any chance of adding this project to F-Droid?

https://f-droid.org/

F-Droid policies do not allows for non-free libraries to be used. https://f-droid.org/docs/Inclusion_Policy/

linsui commented 4 days ago

The code has to be FOSS but the model data can be non-commercial. If MLkit is optional you can provide a flavor without it. IIUC, MLkit is only used to detect the language. So maybe you can provide a flavor which can only set the languange manually.

niedev commented 2 days ago

The code has to be FOSS but the model data can be non-commercial. If MLkit is optional you can provide a flavor without it. IIUC, MLkit is only used to detect the language. So maybe you can provide a flavor which can only set the languange manually.

Thank you for the suggestion.

Managing multiple versions of the app would complicate maintenance and I would have less time to make truly useful changes, putting the app in F-Droid is important to me, but improving the app for now is much more important.

But surely when it will be possible I will try to slowly replace all the closed source or non-commercial components with 100% open source alternatives (if they will have an equally good quality and speed).