xinjli / allosaurus

Allosaurus is a pretrained universal phone recognizer for more than 2000 languages
GNU General Public License v3.0
532 stars 85 forks source link

Change the location for the downloaded model #13

Open babat00nday opened 3 years ago

babat00nday commented 3 years ago

Hi,

It would be great if there was support for modifying the location in which the latest model (and other model versions) would be downloaded into. For example python -m allosaurus.run [--lang <language name>] [--model <model name>] [--device_id <gpu_id>] [--output <output_file>] -i <audio file/directory> -mp <custom directory to save models to>

steveway commented 3 years ago

I second this! At the moment if you package this using something like Pyinstaller then it will redownload the model every start new because pyinstaller cleans up the temporary directory for that afterwards. Manually selecting where to download the model to and from where to load it would help here.

xinjli commented 3 years ago

Oh, I did not realize this issue. It makes a lot of sense, we will fix it

steveway commented 3 years ago

@toonday This Pull Request implements some functionality for loading models to a manually selectable location: https://github.com/xinjli/allosaurus/pull/28 This has been integrated in release 1.0.1 of allosaurus.