mozilla / DeepSpeech

DeepSpeech is an open source embedded (offline, on-device) speech-to-text engine which can run in real time on devices ranging from a Raspberry Pi 4 to high power GPU servers.
Mozilla Public License 2.0
25.29k stars 3.96k forks source link

Suggestion: Compress release models #3329

Open sudden6 opened 4 years ago

sudden6 commented 4 years ago

The deepspeech-0.8.2-models.scorer file is 900MB uncompressed, but with xz -ze deepspeech-0.8.2-models.scorer it compresses down to 727MB, which makes downloads over slow connections a lot faster. Time for decompression is 50s for my laptop with SSD.

The compressed version could be easily uploaded in parallel with the uncompressed version.

lissyx commented 4 years ago

This adds extra complexity to producing a release, and I'm not convinced about the 20% win given the amount of data: if the connection is slow, it's still going to take quite some time to download. Is there really a usecase where a 730MB download VS a 900MB makes sense and is useful for the extra disk space wasting?

Also, xz is fast at decompression, but it's quite intensive at compression time, and models, as you can see, do not compress super well.

ftyers commented 4 years ago

Perhaps this could be made into a topic on Discourse under the Mozilla STT topic and further information could be gathered as to the effectiveness, you could also give us details of your use case. I've been "out in a field" a lot of the time and know how frustrating it is trying to download gigabytes of data over a dodgy connection. But in general, GitHub issues is not really the place for this kind of suggestion.

sudden6 commented 4 years ago

@lissyx Yes, it adds some complexity to your release process, but I'd argue that adding a line or two to the final upload script is a minimal addition.

As for the use case, for me it's just getting started faster. Maybe one could argue for mobile users and their data caps. Though I see no major drawbacks to compressing the model files. Compression takes a bit of time, I agree, but it's only done once. Decompression is also very fast, so no problem either.

Is there really a usecase where a 730MB download VS a 900MB makes sense and is useful for the extra disk space wasting?

I don't know where you see wasted disk space, I'd expect to either store the compressed or uncompressed version locally.

@ftyers I'm probably not going to create an account there, as this is just a suggestion.

If you feel like this suggestion does not provide a benefit to DeepSpeech, feel free to ignore it and close this issue.

lissyx commented 4 years ago

@lissyx Yes, it adds some complexity to your release process, but I'd argue that adding a line or two to the final upload script is a minimal addition.

It's not that simple.

I don't know where you see wasted disk space, I'd expect to either store the compressed or uncompressed version locally.

We still have to host compressed and uncompressed versions.

If you feel like this suggestion does not provide a benefit to DeepSpeech, feel free to ignore it and close this issue.

I'd like to understand if there's a usecase where this could be a game-changer.

@ftyers I'm probably not going to create an account there, as this is just a suggestion.

You can login on Discourse using Github. We use Github only for tracking bugs and features, so for the purpose of the discussion and discoverability of support / debates, it's better if things sticks to their places.