rhasspy / rhasspy3

An open source voice assistant toolkit for many human languages
MIT License
295 stars 23 forks source link

Allow tensorflow in place of tflite #50

Open mweinelt opened 11 months ago

mweinelt commented 11 months ago

As a distro, we are packaging tensorflow, but not tflite. The latter is a small cut-out of tensorflow, so they share the same entrypoint.

>>> import tensorflow.lite as tflite
2023-09-29 21:46:53.737907: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-09-29 21:46:53.755324: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
>>> tflite.Interpreter
<class 'tensorflow.lite.python.interpreter.Interpreter'>

This allows us to provide tensorflow in place of tflite, at the cost of a higher runtime closure size, but reduced maintenance load.