Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLibraryNotFound = errors.New("tensorflowlite_c library not found")
Error for a bundle with no tensorflowlite_c library in the places it keeps one
var ErrModelShape = errors.New("unexpected wake word model tensor shape")
Error for a model whose tensors do not have the sizes the wake word pipeline feeds and reads
var ErrPartialFrame = errors.New("wake word input ends in a partial frame")
Error for input that ends in a partial sample or embedding window
var ErrUnsupportedPlatform = errors.New("no tensorflowlite_c build for " + runtime.GOOS + "/" + runtime.GOARCH)
Error for a platform that bundles carry no tensorflowlite_c build for
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
Installed openWakeWord bundle directory: a lib directory with the tensorflowlite_c library and a models directory with the feature models
type Features ¶
type Features struct {
// contains filtered or unexported fields
}
Streaming front end that turns 16 kHz 16-bit mono audio into embedding windows through the mel spectrogram and embedding models; not safe for concurrent use
func (*Features) Close ¶
func (f *Features) Close()
Releases both interpreters and both models, later calls doing nothing
func (*Features) ProcessStreaming ¶
Feeds 16-bit native endian mono audio and yields each group of embedding windows that becomes ready, stopping when yield returns false; nothing once closed; the yielded slice is only valid until yield returns
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
One wake word classifier scoring rolling windows of embeddings; not safe for concurrent use
func (*Model) Close ¶
func (m *Model) Close()
Releases the interpreter and the model, later calls doing nothing
func (*Model) ProcessStreaming ¶
Feeds embedding windows and yields one score per classifier window that becomes ready, stopping when yield returns false; nothing once closed
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
TensorFlow Lite C library with the functions the wake word models call bound, kept loaded for the life of the process
func OpenRuntime ¶
Runtime over the tensorflowlite_c library file at path, its symbols made global for the delegates it loads