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

Add to F-Droid #9

Open
takiainen opened this issue Jun 19, 2024 · 19 comments
Open

Add to F-Droid #9

takiainen opened this issue Jun 19, 2024 · 19 comments

Comments

@takiainen
Copy link

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
Copy link
Owner

niedev commented Jun 19, 2024

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
Copy link

Hey @IzzySoft, what do you think?

@IzzySoft
Copy link

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
Copy link
Owner

niedev commented Jun 19, 2024

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

@IzzySoft
Copy link

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 😉

That said: Best luck!

@niedev
Copy link
Owner

niedev commented Jun 19, 2024

Thank you! I will do my best

@chameleon-lizard
Copy link

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
Copy link
Owner

niedev commented Jun 19, 2024

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
Copy link

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
Copy link
Owner

niedev commented Jun 19, 2024

Ok 👍 Thank you!

@noctux
Copy link

noctux commented Jun 20, 2024

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
Copy link

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/

@niedev niedev pinned this issue Jun 24, 2024
@linsui
Copy link

linsui commented Jun 25, 2024

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
Copy link
Owner

niedev commented Jun 26, 2024

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).

@niedev niedev unpinned this issue Jul 4, 2024
@Ganipotes
Copy link

Instead of f-droid, here are some alternatives:

Obtainium: it allows you to retrieve from Github releases, so there's nothing in particular to do. It might be useful to inform users in the read-me to make updates easier.

Accrescent: the store is still in beta, so it's a whitelist for application submission, as it's not yet developer-friendly, but it's quite ready for users. Applications can be open source or closed source, so there's no problem with components.

IMO it would be good to add obtanium now, and keep an eye on accrescent to add it in the future when it's 1.0.

@licaon-kter
Copy link

licaon-kter commented Sep 9, 2024

@Ganipotes Please open a separate issue about your favorite separate solutions, other that those in the title of the issue

also, I'm under the impression that the first link magically changes "Last updated on" every time I visit it, but the content is still 3 years old talking about things that were fixed long ago.

@niedev
Copy link
Owner

niedev commented Sep 9, 2024

Hi @Ganipotes, thank you for your suggestions!
I tried Obtanium and although it is very useful it doesn't seem to be that easy to use for an average user (I myself was intimidated when I saw all those options to add an app), for now however I can add in the readme an indication on how to receive notifications for new releases on GitHub, and I was thinking in the future to integrate an update control directly into the app.
I will keep an eye on Accrescent, if it will be supported for a long time and will reach a good number of users I might add my app there too (but for now F-Droid and Play Store have priority being more mature).

@lrq3000
Copy link

lrq3000 commented Dec 5, 2024

I was also going to suggest Meta's fasttext model, seems like a match made in heaven with NLLB, fasttext was made from the same corpus and hence supports as many languages (hence more than Whisper).

Note that the latest language identification (LID) model supporting 217 languages is also under CC-BY-NC 4.0, hence it's "open-source for non-commercial use" (ie, non free software), but this should work for F-Droid. Direct link is here (expanded from the tinyurl): https://dl.fbaipublicfiles.com/nllb/lid/lid218e.bin

A less accurate alternative is to simply use Whisper, see the end of this collab script: https://colab.research.google.com/drive/1rS1L4YSJqKUH_3YxIQHBI982zso23wor?usp=sharing#scrollTo=Mh_e6rV62QUM

@niedev
Copy link
Owner

niedev commented Dec 8, 2024

Hi again @lrq3000, thank you for your suggestions.

Note that the latest language identification (LID) model supporting 217 languages is also under CC-BY-NC 4.0, hence it's "open-source for non-commercial use" (ie, non free software), but this should work for F-Droid. Direct link is here (expanded from the tinyurl): https://dl.fbaipublicfiles.com/nllb/lid/lid218e.bin

I tested this quickly and it doesn't seems to have the same quality as Google's Language identification (it failed to identify "ciao" as Italian, only increasing the length of the text works, while Google's almost never gets it wrong).

A less accurate alternative is to simply use Whisper, see the end of this collab script: https://colab.research.google.com/drive/1rS1L4YSJqKUH_3YxIQHBI982zso23wor?usp=sharing#scrollTo=Mh_e6rV62QUM

I already tried Whisper automatic language detection but it significantly decreases the quality of speech recognition (even if the recognized language is the correct one).

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