Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions openwakeword/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
# Do imports for inference framework
if inference_framework == "tflite":
try:
import tflite_runtime.interpreter as tflite
import ai_edge_litert.interpreter as tflite

def tflite_predict(tflite_interpreter, input_index, output_index, x):
tflite_interpreter.set_tensor(input_index, x)
Expand All @@ -127,8 +127,8 @@ def tflite_predict(tflite_interpreter, input_index, output_index, x):
inference_framework = "onnx"
wakeword_models = [i.replace('.tflite', '.onnx') for i in wakeword_models]
else:
raise ValueError("Tried to import the tflite runtime for provided tflite models, but it was not found. "
"Please install it using `pip install tflite-runtime`")
raise ValueError("Tried to import the LiteRT runtime for provided LiteRT models, but it was not found. "
"Please install it using `pip install ai-edge-litert`")

if inference_framework == "onnx":
try:
Expand Down
2 changes: 1 addition & 1 deletion openwakeword/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self,

elif inference_framework == "tflite":
try:
import tflite_runtime.interpreter as tflite
import ai_edge_litert.interpreter as tflite
except ImportError:
raise ValueError("Tried to import the TFLite runtime, but it was not found."
"Please install it using `pip install tflite-runtime`")
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def build_additional_requires():
version="0.6.0",
install_requires=[
'onnxruntime>=1.10.0,<2',
'tflite-runtime>=2.8.0,<3; platform_system == "Linux"',
'ai-edge-litert; platform_system == "Linux"',
'tqdm>=4.0,<5.0',
'scipy>=1.3,<2',
'scikit-learn>=1,<2',
Expand Down Expand Up @@ -91,4 +91,4 @@ def build_additional_requires():
packages=setuptools.find_packages(),
include_package_data=True,
python_requires=">=3.7",
)
)