speechmatics / speechmatics-python

Python library and CLI for Speechmatics
https://speechmatics.github.io/speechmatics-python/
MIT License
59 stars 16 forks source link

Move the asr-metrics dependencies into a 'extra' set of dependencies #108

Open JamesG-Speechmatics opened 2 weeks ago

JamesG-Speechmatics commented 2 weeks ago

Installing numpy and other large libraries is not necessary if only doing realtime speech recognition. This MR moves the dependencies of asr_metrics into a larger version of the package to be installed as

pip3 install speechmatics-python[full]

todo: code in asr_metrics to fail gracefully on import error.

Because this is a breaking change for anyone who does use asr_metrics, the major version is bumped from 2 to 3.

JamesG-Speechmatics commented 2 weeks ago

todo: code in asr_metrics to fail gracefully on import error.

This would be a nice to do but I don't have time to do it and test it for the different metrics scripts, it would be something like

try:
  import things
except ImportError:
  # write message about speechmatics-python[full]

in the right places (the file where main() is defined I suppose). @dan-cochrane