Skip to content

General Architecture

Overall Operation

The following diagram illustrates the general operation of the Wake Word Engine inside an application:

ww-overview

  1. During an initialization phase, the application loads the Wake Word Model into memory. It then passes the model, along with configuration parameters to the engine. The engine stores a reference to this model memory to use during its processing, so it needs to remain persistent throughout the lifetime of the application.

  2. The application queries the engine for the size of scratch memory needed to run the loaded model. It allocates the required amount and completes the initialization.

  3. The application then runs a continuous loop, feeding 16kHz audio samples into the engine, 10ms (160 samples) at a time. Overall Architecture

  4. When a wake word is detected, or any other event such as VAD or events generated from other components, the engine calls an event handling callback (registered during initialization).

Wake Word detection events will trigger a callback after all audio containing the wake word has been passed in, as illustrated in the waveform / timeline below.

Data Flow

v2 API Callbacks

The v2 API uses a single callback function to pass back all supported event types. The top level PryonLiteV2Event structure has pointers to payloads for all supported event types. When an event is triggered pointers to valid payloads will be set and pointers to payloads not applicable to the event will be NULL. See the API sample code for an example of how to handle events. V2 Events