Open
Description
Hi, I'm trying to create a custom model of mine own with the current notebook , every model output not working, i always have the errors message as below, i even tried to recreate the "Okay Computer" model (size 30000) from esphome repo with default seting but nothing works, only that model or model that was created from last month from this repo and esphome one works.
`Didn't find op for builtin opcode 'DEQUANTIZE'
Failed to get registration from op code DEQUANTIZE
E (823) micro_wake_word: Failed to allocate tensors for the streaming model
E (833) micro_wake_word: Failed to initialize a wake word model Gideon.
E (833) micro_wake_word: Failed to load the wake word model(s) or allocate buffers
W (843) micro_wake_word: Wake word component has an error. Please check logs`
this is the code i use to convert the model:
`import os
def convert_tflite_to_h(tflite_file):
base_name = os.path.splitext(os.path.basename(tflite_file))[0]
output_file = f"{base_name}.h"
array_name = base_name + "_tflite"
with open(tflite_file, "rb") as f:
data = f.read()
with open(output_file, "w") as f:
f.write(f"unsigned char {array_name}[] = {{\n")
for i, byte in enumerate(data):
f.write(f"0x{byte:02x}, ")
if (i + 1) % 12 == 0: # Break line every 12 bytes
f.write("\n")
f.write("};\n\n")
f.write(f"unsigned int {array_name}_len = {len(data)};\n")
print(f"Header file generated: {output_file}")
print(f"Array length: {len(data)} bytes")
convert_tflite_to_h("trained_models/wakeword/tflite_stream_state_internal_quant/stream_state_internal_quant.tflite")
`
I hope you can help me found out what went wrong here. Thank you.
Metadata
Metadata
Assignees
Labels
No labels