File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -813,13 +813,13 @@ def convert_onnx_to_tflite(onnx_model_path, output_path):
813
813
# Create openwakeword model
814
814
if args .train_model is True :
815
815
F = openwakeword .utils .AudioFeatures (device = 'cpu' )
816
- input_shape = F . get_embedding_shape ( config [ "total_length" ] // 16000 ) # training data is always 16 khz
816
+ input_shape = np . load ( os . path . join ( feature_save_dir , "positive_features_test.npy" )). shape [ 1 :]
817
817
818
818
oww = Model (n_classes = 1 , input_shape = input_shape , model_type = config ["model_type" ],
819
819
layer_dim = config ["layer_size" ], seconds_per_example = 1280 * input_shape [0 ]/ 16000 )
820
820
821
821
# Create data transform function for batch generation to handle differ clip lengths (todo: write tests for this)
822
- def f (x , n = 16 ):
822
+ def f (x , n = input_shape [ 0 ] ):
823
823
"""Simple transformation function to ensure negative data is the appropriate shape for the model size"""
824
824
if n > x .shape [1 ] or n < x .shape [1 ]:
825
825
x = np .vstack (x )
You can’t perform that action at this time.
0 commit comments