wakewordcatalog

package
v0.51.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package wakewordcatalog is the kernel-neutral source of truth for the wake phrases SpeechKit trains and serves, across BOTH engine families:

  • openWakeWord (ONNX): consumed host-side by the desktop reference app and the box companion. Trained via tools/wakeword-training (livekit-wakeword).
  • microWakeWord (TFLite + JSON manifest): consumed ON-DEVICE by ESPHome voice satellites and the Kombify-Box firmware (esp-tflite-micro).

One phrase (e.g. "hey_kombify") is therefore describable once here and served to either family. The package is pure data + accessors: no HTTP, no config, no build tag, so it links into the kernel, the Linux server adapter, and tooling alike.

microWakeWord artifacts carry an Available flag. It is false until the microWakeWord candidate pipeline (tools/wakeword-training/microwakeword) has produced a .tflite, all manifest params have independent measurements, the exact bytes have passed physical validation, and publication is verified; the ONNX artifacts are already trained and published.

Index

Constants

View Source
const (
	MicroWakeWordType            = "micro"
	MicroWakeWordManifestVersion = 2
	DefaultMinimumESPHomeVersion = "2024.7.0"
	// MicroWakeWordFeatureStepSize is fixed by the micro_wake_word streaming
	// frontend (10 ms slices); it is not a per-model tunable.
	MicroWakeWordFeatureStepSize = 10
)

microWakeWord manifest constants (ESPHome micro_wake_word v2 schema).

View Source
const License = "apache-2.0"

License is the SPDX-ish identifier for every SpeechKit-trained wake model. All phrases are trained from scratch (see tools/wakeword-training/README.md) specifically so the result is permissively licensed for OSS + commercial use.

Variables

View Source
var (
	SharedMelspec = FileArtifact{
		URL:       hfBase + "melspectrogram.onnx",
		SHA256:    "ba2b0e0f8b7b875369a2c89cb13360ff53bac436f2895cced9f479fa65eb176f",
		SizeBytes: 1_087_958,
	}
	SharedEmbedding = FileArtifact{
		URL:       hfBase + "embedding_model.onnx",
		SHA256:    "70d164290c1d095d1d4ee149bc5e00543250a7316b59f31d056cff7bd3075c1f",
		SizeBytes: 1_326_578,
	}
)

SharedMelspec and SharedEmbedding are the phrase-independent openWakeWord frontend models. Every openWakeWord phrase requires both, alongside its own per-phrase head. microWakeWord models do NOT use these (the TFLite model is self-contained).

Functions

This section is empty.

Types

type FileArtifact

type FileArtifact struct {
	URL       string
	SHA256    string
	SizeBytes int64
}

FileArtifact is a downloadable model file: a stable URL plus an integrity hash and size. SHA256 is lower-case hex of the raw bytes.

type MicroWakeWordArtifact

type MicroWakeWordArtifact struct {
	Available bool
	File      FileArtifact
	Params    MicroWakeWordParams
}

MicroWakeWordArtifact describes the on-device TFLite model plus the manifest parameters ESPHome / esp-tflite-micro need to run it. Available is false until governed publication has been independently verified at the serving origin.

type MicroWakeWordParams

type MicroWakeWordParams struct {
	ProbabilityCutoff     float64
	SlidingWindowSize     int
	FeatureStepSize       int
	TensorArenaSize       int
	MinimumESPHomeVersion string
}

MicroWakeWordParams mirrors the "micro" object of an ESPHome microWakeWord v2 model manifest. ProbabilityCutoff, SlidingWindowSize and TensorArenaSize are evidence-bound before publication; FeatureStepSize is fixed (see the const above). TensorArenaSize comes from the target runtime rather than the model trainer.

type Model

type Model struct {
	ID               string   // stable slug, e.g. "hey_kombify"
	WakeWord         string   // spoken phrase, e.g. "Hey Kombify"
	DisplayName      string   // human label for dashboards
	Description      string   // short tuning/pronunciation note
	TrainedLanguages []string // BCP-47-ish language tags the model was trained on
	OpenWakeWord     OpenWakeWordArtifact
	MicroWakeWord    MicroWakeWordArtifact
}

Model is one wake phrase available across both engine families.

func All

func All() []Model

All returns a copy of the model registry. Callers must not mutate the shared slice contents; the returned slice header is safe to range over.

func ByID

func ByID(id string) (Model, bool)

ByID returns the model with the given slug (case-insensitive) and whether it was found.

func (Model) HasMicroWakeWord

func (m Model) HasMicroWakeWord() bool

HasMicroWakeWord reports whether a published microWakeWord TFLite exists for this phrase (Available AND a real file URL).

func (Model) HasOpenWakeWord

func (m Model) HasOpenWakeWord() bool

HasOpenWakeWord reports whether the model ships a published openWakeWord head.

type OpenWakeWordArtifact

type OpenWakeWordArtifact struct {
	File                 FileArtifact
	RecommendedThreshold float64
}

OpenWakeWordArtifact is the per-phrase conv-attention ONNX head. The shared melspectrogram + embedding frontends every phrase depends on are SharedMelspec and SharedEmbedding below.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL