elan-ev / vosk-cli

Apache License 2.0
2 stars 9 forks source link

Use model instead of language #6

Closed lkiesow closed 1 year ago

lkiesow commented 1 year ago

This patch deprecates the language parameter, suggesting users should use a new model parameter instead.

The idea behind this change is that Vosk provides several different models for the same language and just using a language code for identification does not allow us to distinguish between these models. For example, I was surprised to find out that the packaged English model is the one which is deliberately kept small for use on mobile devices and does not have a very good error rate.

Loading the language model is now also more flexible sine users can either specify a path to the model with fallbacks to default locations. That way, users do not need to write files into system directories for testing or when they want to use their own model.

marwyg commented 1 year ago

I checked it out and tested it. Seems to work.