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¶
Public Functions Documentation¶
function WyomingSatellite¶
espos_voice::WyomingSatellite::WyomingSatellite (
espos_audio::AudioDriver * audio,
const WyomingSatelliteConfig & config={}
)
function audio¶
function client_connected¶
function ota_quiesce¶
function ota_resume¶
function probe_mic_levels¶
function running¶
function set_mic_muted_fn¶
function set_ptt_held¶
function set_transcript_cb¶
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¶
function state¶
function stop¶
function trigger_ptt¶
function wake_capturing¶
function wake_chunks¶
function wake_connected¶
function wake_detections¶
function wake_enabled¶
function wake_on_device¶
function wake_pcm_age_ms¶
function wake_pcm_clear¶
function wake_pcm_snapshot¶
function wake_peak¶
function wake_word¶
function ~WyomingSatellite¶
The documentation for this class was generated from the following file espos_voice/include/espos_voice/wyoming_satellite.h