PebbleOS
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
Voice endpoint

Pebble Protocol voice control endpoint (11000). More...

Data Structures

struct  AudioTransferInfoSpeex
 Speex stream parameters, sent before the encoded audio. More...
 
union  VEFlags
 Message flags. More...
 
struct  SessionSetupMsg
 Session setup request, from the watch. More...
 
struct  SessionSetupResultMsg
 Session setup result, from the phone. More...
 
struct  VoiceSessionResultMsg
 Dictation or NLP result, from the phone. More...
 
struct  VEFlags.__unnamed100__
 

Enumerations

enum  VoiceEndpointSessionType { VoiceEndpointSessionTypeDictation = 0x01 , VoiceEndpointSessionTypeCommand = 0x02 , VoiceEndpointSessionTypeNLP = 0x03 , VoiceEndpointSessionTypeCount }
 Kind of voice session. More...
 
enum  VoiceEndpointResult {
  VoiceEndpointResultSuccess = 0x00 , VoiceEndpointResultFailServiceUnavailable = 0x01 , VoiceEndpointResultFailTimeout = 0x02 , VoiceEndpointResultFailRecognizerError = 0x03 ,
  VoiceEndpointResultFailInvalidRecognizerResponse = 0x04 , VoiceEndpointResultFailDisabled = 0x05 , VoiceEndpointResultFailInvalidMessage = 0x06
}
 Result of a voice session, reported by the phone. More...
 
enum  MsgId { MsgIdSessionSetup = 0x01 , MsgIdDictationResult = 0x02 , MsgIdNLPResult = 0x03 }
 Voice endpoint message identifier. More...
 
enum  VEAttributeId {
  VEAttributeIdInvalid = 0x00 , VEAttributeIdAudioTransferInfoSpeex = 0x01 , VEAttributeIdTranscription = 0x02 , VEAttributeIdAppUuid = 0x03 ,
  VEAttributeIdReminder = 0x04 , VEAttributeIdTimestamp = 0x05
}
 Attribute identifier in voice endpoint messages. More...
 

Functions

void voice_endpoint_setup_session (VoiceEndpointSessionType session_type, AudioEndpointSessionId session_id, AudioTransferInfoSpeex *info, Uuid *app_uuid)
 Ask the phone to start a voice session.
 

Detailed Description

Pebble Protocol voice control endpoint (11000).

Sets up dictation and NLP sessions with the phone, whose audio is streamed through the audio endpoint, and passes the results back to the voice service.


Data Structure Documentation

◆ AudioTransferInfoSpeex

struct AudioTransferInfoSpeex

Speex stream parameters, sent before the encoded audio.

Data Fields
uint16_t bit_rate Bit rate in bits per second.
uint8_t bitstream_version Speex bitstream version.
uint16_t frame_size Samples per frame.
uint32_t sample_rate Sample rate in Hz.
char version[20] Speex version string.

◆ VEFlags

union VEFlags

Message flags.

Data Fields
struct VEFlags.__unnamed100__ __unnamed__
uint32_t all All flags.

◆ SessionSetupMsg

struct SessionSetupMsg

Session setup request, from the watch.

Data Fields
struct pbl_generic_attr_list attr_list Attributes: speex info and, for apps, the app UUID.
VEFlags flags Flags.
MsgId msg_id: 8 MsgIdSessionSetup.
AudioEndpointSessionId session_id Audio endpoint session.
VoiceEndpointSessionType session_type: 8 Kind of session.

◆ SessionSetupResultMsg

struct SessionSetupResultMsg

Session setup result, from the phone.

Data Fields
VEFlags flags Flags.
MsgId msg_id: 8 MsgIdSessionSetup.
VoiceEndpointResult result: 8 Setup result.
VoiceEndpointSessionType session_type: 8 Kind of session.

◆ VoiceSessionResultMsg

struct VoiceSessionResultMsg

Dictation or NLP result, from the phone.

Data Fields
struct pbl_generic_attr_list attr_list Result attributes.
VEFlags flags Flags.
MsgId msg_id: 8 MsgIdDictationResult or MsgIdNLPResult.
VoiceEndpointResult result: 8 Session result.
AudioEndpointSessionId session_id Audio endpoint session.

◆ VEFlags.__unnamed100__

struct VEFlags.__unnamed100__
Data Fields
uint32_t app_initiated: 1 The session was started by an app.

Enumeration Type Documentation

◆ MsgId

enum MsgId

Voice endpoint message identifier.

Enumerator
MsgIdSessionSetup 

Session setup request (watch) or result (phone).

MsgIdDictationResult 

Dictation result, from the phone.

MsgIdNLPResult 

NLP result, from the phone.

◆ VEAttributeId

Attribute identifier in voice endpoint messages.

Enumerator
VEAttributeIdInvalid 

Invalid.

VEAttributeIdAudioTransferInfoSpeex 

AudioTransferInfoSpeex.

VEAttributeIdTranscription 

Transcription.

VEAttributeIdAppUuid 

UUID of the app that started the session.

VEAttributeIdReminder 

Reminder text of an NLP result.

VEAttributeIdTimestamp 

32-bit timestamp of an NLP result.

◆ VoiceEndpointResult

Result of a voice session, reported by the phone.

Enumerator
VoiceEndpointResultSuccess 

Success.

VoiceEndpointResultFailServiceUnavailable 

The recognition service is unavailable.

VoiceEndpointResultFailTimeout 

Timed out.

VoiceEndpointResultFailRecognizerError 

The recognizer failed.

VoiceEndpointResultFailInvalidRecognizerResponse 

The recognizer response was invalid.

VoiceEndpointResultFailDisabled 

Voice is disabled on the phone.

VoiceEndpointResultFailInvalidMessage 

The message was malformed.

◆ VoiceEndpointSessionType

Kind of voice session.

Enumerator
VoiceEndpointSessionTypeDictation 

Speech to text.

VoiceEndpointSessionTypeCommand 

Command recognition, not used yet.

VoiceEndpointSessionTypeNLP 

Natural language processing, e.g.

reminders.

VoiceEndpointSessionTypeCount 

Number of session types.

Function Documentation

◆ voice_endpoint_setup_session()

void voice_endpoint_setup_session ( VoiceEndpointSessionType  session_type,
AudioEndpointSessionId  session_id,
AudioTransferInfoSpeex *  info,
Uuid *  app_uuid 
)

Ask the phone to start a voice session.

Also switches the connection to its lowest latency for the duration of a voice session.

Parameters
session_typeKind of session.
session_idAudio endpoint session carrying the audio.
infoSpeex stream parameters.
app_uuidUUID of the requesting app, or NULL for a system session.