spot-convert¶
Command-line phrase spotter model conversion tool, targeting Sensory's deeply embedded DSP solutions running THF Micro.
Usage¶
Converts TrulyNatural SDK wake word models to THF Micro format.
usage: spot-convert -t task [options] target
options:
-a : convert all operating-points
-c : create .c output (in addition to .bin)
-o output : full prefix for output filenames
-p output-prefix : prefix for output filenames (default: task-target-)
-q slotname : model slot prefix
-s setting=value : override a task setting
-t task : set a task filename (required)
-v [-v [-v]] : increase verbosity
Output filenames are determined by the model parameters:
$(prefix) [-] [slot$(slotname)-] $(target)- $(version)-
op$(operating-point)- {dev,prod}- {net,search}.{bin,c,h}
where:
prefix specified by the -p option, or taken from the filename
of the task if -p isn't used.
version is the oldest DSP library that can run this model.
-dev- models are limited in runtime or number of recognition
events and should not be used in products.
-prod- models are not limited and ready for production use.
Use the -o option to override this filename pattern to:
$(prefix)[-]{net,search}.{bin,c,h}
The -o and -a options are mutually exclusive.
Output filenames are constrained to never start with "-"
Settings are strings used as keys to query or change task behavior.
Most frequently used for wake words and command sets is operating-point.
Refer to the TrulyNatural SDK documentation for a complete list and
descriptions of all supported settings.
Examples¶
Convert a phrase spotter model to pc38 format. This converts only the default operating point for the model, point 10:
% spot-convert -v -t model/spot-hbg-enUS-1.4.0-m.snsr pc38
operating-point: 10
production-ready: yes
wrote acoustic model (bin) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op10-prod-net.bin"
wrote search model (bin) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op10-prod-search.bin"
wrote search header to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op10-prod-search.h"
Convert a phrase spotter model to pc38 format, overriding base filename:
% spot-convert -v -v -t model/spot-hbg-enUS-1.4.0-m.snsr -p embedded pc38
target: pc38
basename: embedded-pc38-
operating-point: 10
production-ready: yes
wrote acoustic model (bin) to "embedded-pc38-3.4.0-op10-prod-net.bin"
wrote search model (bin) to "embedded-pc38-3.4.0-op10-prod-search.bin"
wrote search header to "embedded-pc38-3.4.0-op10-prod-search.h"
Convert a phrase spotter model to pc38 format, overriding filename metadata:
% spot-convert -v -v -t model/spot-hbg-enUS-1.4.0-m.snsr -o embedded pc38
target: pc38
basename: embedded-
operating-point: 10
production-ready: yes
wrote acoustic model (bin) to "embedded-net.bin"
wrote search model (bin) to "embedded-search.bin"
wrote search header to "embedded-search.h"
Convert all operating points, produce C code in addition to the binaries:
% spot-convert -v -a -c -t model/spot-hbg-enUS-1.4.0-m.snsr pc38
operating-point: 1
production-ready: yes
wrote acoustic model (bin) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op01-prod-net.bin"
wrote search model (bin) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op01-prod-search.bin"
wrote search header to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op01-prod-search.h"
wrote acoustic model (C) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op01-prod-net.c"
wrote search model (C) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op01-prod-search.c"
operating-point: 2
production-ready: yes
wrote acoustic model (bin) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op02-prod-net.bin"
wrote search model (bin) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op02-prod-search.bin"
wrote search header to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op02-prod-search.h"
wrote acoustic model (C) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op02-prod-net.c"
wrote search model (C) to "spot-hbg-enUS-1.4.0-m-pc38-3.4.0-op02-prod-search.c"
... etc ...