NaomiProject / Naomi

The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
https://projectnaomi.com/
MIT License
242 stars 49 forks source link

Add progress bar to app_utils.download_file() #391

Open aaronchantrill opened 10 months ago

aaronchantrill commented 10 months ago

Description

Add a progress bar to app_utils.download_file(url, local_filename) function. This is only really useful when using the command line client (we don't have another client right now) and only before the microphone feedback starts to display. It would be nice to move this into a visualization someday, but this is pretty tightly integrated with the operation itself.

This commit also gives the download_file function the ability to resume partial downloads.

Related Issue

Standard functions with progress bars for downloads #303

Motivation and Context

If a large file needs to be downloaded, this gives the user a sense of how long the download will take.

How Has This Been Tested?

I have tested this function on a laptop computer and a Raspberry Pi 4 both running Debian Bookworm. I tested by installing the https://github.com/aaronchantrill/Naomi_VOSK_STT plugin and allowing it to download a model.

Screenshots (if appropriate):

Types of changes

Checklist: