PebbleOS
Loading...
Searching...
No Matches
Macros | Typedefs | Enumerations | Functions
voice.h File Reference
#include <stdbool.h>
#include <kernel/pebble_tasks.h>
#include <pbl/services/audio_endpoint.h>
#include <pbl/services/voice_endpoint.h>
#include <pbl/services/voice/transcription.h>
#include <applib/graphics/utf8.h>
#include <sys/types.h>

Macros

#define VOICE_SESSION_ID_INVALID   AUDIO_ENDPOINT_SESSION_INVALID_ID
 Invalid session id, returned when a session cannot be started.
 

Typedefs

typedef AudioEndpointSessionId VoiceSessionId
 Dictation session identifier, the audio endpoint transfer session id.
 

Enumerations

enum  VoiceStatus {
  VoiceStatusSuccess , VoiceStatusTimeout , VoiceStatusErrorGeneric , VoiceStatusErrorConnectivity ,
  VoiceStatusErrorDisabled , VoiceStatusRecognizerResponseError
}
 Outcome reported in voice service events. More...
 

Functions

VoiceSessionId voice_start_dictation (VoiceEndpointSessionType session_type)
 Start a dictation session.
 
void voice_stop_dictation (VoiceSessionId session_id)
 Stop recording and wait for the transcription.
 
void voice_cancel_dictation (VoiceSessionId session_id)
 Cancel a dictation session at any stage.
 
void voice_init (void)
 Initialize the voice service.
 
void voice_handle_session_setup_result (VoiceEndpointResult result, VoiceEndpointSessionType session_type, bool app_initiated)
 Handle a session setup result received by the voice endpoint.
 
void voice_handle_dictation_result (VoiceEndpointResult result, AudioEndpointSessionId session_id, Transcription *transcription, bool app_initiated, Uuid *app_uuid)
 Handle a dictation result received by the voice endpoint.
 
void voice_handle_nlp_result (VoiceEndpointResult result, AudioEndpointSessionId session_id, char *reminder, time_t timestamp)
 Handle an NLP (reminder) result received by the voice endpoint.
 
VoiceSessionId sys_voice_start_dictation (VoiceEndpointSessionType session_type)
 Syscall wrapper of voice_start_dictation().
 
void sys_voice_stop_dictation (VoiceSessionId session_id)
 Syscall wrapper of voice_stop_dictation().
 
void sys_voice_cancel_dictation (VoiceSessionId session_id)
 Syscall wrapper of voice_cancel_dictation().
 
void voice_kill_app_session (PebbleTask task)
 Cancel the session started by an app that is exiting.