niedev / RTranslator

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

Sideloading of all components (onnx files)? #16

Closed 3dluvr closed 2 months ago

3dluvr commented 3 months ago

Hi,

Would you please provide instructions, or a method, for sideloading of the components (onnx files) in an off-line mode, so that the app does not have to automatically download them upon first start.

This would most likely benefit everyone, for various reasons such as: lowering mobile data usage, ease of installation on multiple devices, privacy, etc.

Thanks!

niedev commented 3 months ago

Hi, thanks for the suggestion, I added this to the list of things to do 👍

WeiYoun commented 3 months ago

mobile data and wifi cannot download succesfully,although with proxy

fffandpiao commented 3 months ago

I really need the offline download function, but online downloads will get stuck and fail.

niedev commented 3 months ago

@WeiYoun @fffandpiao That's strange, have you checked that you have enough space on your phone? (with a good enough margin) If so can you tell me if you are using an sd card and if the apps are configured to be saved there?

WeiYoun commented 3 months ago

@WeiYoun @fffandpiao That's strange, have you checked that you have enough space on your phone? (with a good enough margin) If so can you tell me if you are using an sd card and if the apps are configured to be saved there?

there are enough space to store(about 70G),and has permission to save,many times when download *head.onnx failed.

niedev commented 3 months ago

@WeiYoun @fffandpiao That's strange, have you checked that you have enough space on your phone? (with a good enough margin) If so can you tell me if you are using an sd card and if the apps are configured to be saved there?

there are enough space to store(about 70G),and has permission to save,many times when download *head.onnx failed.

You are using an sd card? The apps are configured to be saved there?

fffandpiao commented 3 months ago

@WeiYoun @fffandpiao这很奇怪,你检查过你的手机是否有足够的空间吗?(有足够的余地)如果是的话,你能告诉我你是否使用了 SD 卡以及应用程序是否配置为保存在那里吗?

I downloaded successfully. Every time I downloaded a package, it would get stuck. I thought it was unresponsive. It took a long time to download online.

niedev commented 3 months ago

@fffandpiao if you have an sdcard and have it set to hold app data, that might have been the problem, since I'm currently using Android's downloadManager for downloads, and it can't save files directly to the app's internal storage, so I download them to external storage and then move them to the app's internal storage, normally this process happens instantly, but if you use an sdcard configured as I said above, the transfer takes quite a while.

Or maybe the download is slow for this reason (my models are saved on Github, so the download is done from there)

niedev commented 2 months ago

The new release that supports sideloading is out 😁, and the guide for sideloading is here, let me know how it works.

3dluvr commented 2 months ago

I can confirm that the app is successfully sideloading the local models, when dropped in the appropriate folder per the guide.

You are awesome, thank you!