Skip to content

Class espos_voice::WyomingSatellite

ClassList > espos_voice > WyomingSatellite

  • #include <espos_voice/wyoming_satellite.h>

Public Types

Type Name
typedef void(*)(void *ctx, const char *text) TranscriptFn

Public Functions

Type Name
WyomingSatellite (espos_audio::AudioDriver * audio, const WyomingSatelliteConfig & config={})
espos_audio::AudioDriver * audio () const
bool client_connected () const
void ota_quiesce ()
void ota_resume ()
bool probe_mic_levels (espos_audio::AudioDriver::MicLevels & out)
bool running () const
void set_mic_muted_fn (std::function< bool()> fn)
void set_ptt_held (bool held)
void set_transcript_cb (TranscriptFn cb, void * ctx)
bool set_wake_network (const std::string & host, uint16_t port=10400, const std::vector< std::string > & words={})
Switch to a network wake service at runtime, replacing whatever back-end is running.
void start ()
SatState state () const
void stop ()
void trigger_ptt ()
bool wake_capturing () const
uint32_t wake_chunks () const
bool wake_connected () const
uint32_t wake_detections () const
bool wake_enabled () const
bool wake_on_device () const
uint32_t wake_pcm_age_ms () const
void wake_pcm_clear ()
size_t wake_pcm_snapshot (int16_t * out, size_t max_samples)
uint16_t wake_peak ()
const char * wake_word () const
~WyomingSatellite ()

Public Types Documentation

typedef TranscriptFn

using espos_voice::WyomingSatellite::TranscriptFn =  void (*)(void* ctx, const char* text);

Public Functions Documentation

function WyomingSatellite

espos_voice::WyomingSatellite::WyomingSatellite (
    espos_audio::AudioDriver * audio,
    const WyomingSatelliteConfig & config={}
) 

function audio

inline espos_audio::AudioDriver * espos_voice::WyomingSatellite::audio () const

function client_connected

inline bool espos_voice::WyomingSatellite::client_connected () const

function ota_quiesce

void espos_voice::WyomingSatellite::ota_quiesce () 

function ota_resume

void espos_voice::WyomingSatellite::ota_resume () 

function probe_mic_levels

bool espos_voice::WyomingSatellite::probe_mic_levels (
    espos_audio::AudioDriver::MicLevels & out
) 

function running

inline bool espos_voice::WyomingSatellite::running () const

function set_mic_muted_fn

inline void espos_voice::WyomingSatellite::set_mic_muted_fn (
    std::function< bool()> fn
) 

function set_ptt_held

void espos_voice::WyomingSatellite::set_ptt_held (
    bool held
) 

function set_transcript_cb

inline void espos_voice::WyomingSatellite::set_transcript_cb (
    TranscriptFn cb,
    void * ctx
) 

function set_wake_network

Switch to a network wake service at runtime, replacing whatever back-end is running.

bool espos_voice::WyomingSatellite::set_wake_network (
    const std::string & host,
    uint16_t port=10400,
    const std::vector< std::string > & words={}
) 

Discovery is the reason this exists. A panel cannot know at construction time whether a wake service is on the network there is no network yet so it starts on-device and upgrades once it can ask. Calling this before start() just reconfigures; calling it after tears the on-device engine down (releasing the mic, which has a single consumer) and brings the network wake task up.

words empty means "listen for whatever the service is configured for", which is usually what you want: the wake word is the service's business.

There is deliberately no switch back. Once a wake service has been found, a momentary outage should reconnect rather than flip the panel to a different wake word behind the user's back; run_wake() already retries.

Safe to call from any task. Returns false if host is empty.


function start

void espos_voice::WyomingSatellite::start () 

function state

inline SatState espos_voice::WyomingSatellite::state () const

function stop

void espos_voice::WyomingSatellite::stop () 

function trigger_ptt

inline void espos_voice::WyomingSatellite::trigger_ptt () 

function wake_capturing

inline bool espos_voice::WyomingSatellite::wake_capturing () const

function wake_chunks

inline uint32_t espos_voice::WyomingSatellite::wake_chunks () const

function wake_connected

inline bool espos_voice::WyomingSatellite::wake_connected () const

function wake_detections

inline uint32_t espos_voice::WyomingSatellite::wake_detections () const

function wake_enabled

inline bool espos_voice::WyomingSatellite::wake_enabled () const

function wake_on_device

inline bool espos_voice::WyomingSatellite::wake_on_device () const

function wake_pcm_age_ms

uint32_t espos_voice::WyomingSatellite::wake_pcm_age_ms () const

function wake_pcm_clear

void espos_voice::WyomingSatellite::wake_pcm_clear () 

function wake_pcm_snapshot

size_t espos_voice::WyomingSatellite::wake_pcm_snapshot (
    int16_t * out,
    size_t max_samples
) 

function wake_peak

inline uint16_t espos_voice::WyomingSatellite::wake_peak () 

function wake_word

inline const char * espos_voice::WyomingSatellite::wake_word () const

function ~WyomingSatellite

espos_voice::WyomingSatellite::~WyomingSatellite () 


The documentation for this class was generated from the following file espos_voice/include/espos_voice/wyoming_satellite.h