ViveGlass
This object provides a unified interface for managing connections and interactions with VIVE AI Glasses.
Overview
You can use the object for any of the following:
•
Device connection
: Register and establish a secure connection with VIVE AI Glasses.
•
Voice interaction
: Interact with users though text-to-speech (TTS) or transcribe user speech into text through speech-to-text (STT).
•
Audio input:
Record high-quality audio directly from the VIVE AI Glasses microphones.
•
Image input
: Capture high-resolution images and videos using the VIVE AI Glasses camera.
Topics
Connectivity and authentication
void connect (ViveGlassesClientCallback callback)
Initiates a connection with VIVE AI Glasses.
void disconnect ( )
Requests to disconnect from VIVE AI Glasses.
boolean isConnected ()
Checks the current connection status.
Text to speech (TTS)
int speakText (String text, Locale locale)
Converts provided text into spoken audio output.
Speech to text (STT)
int startTranscription (boolean bContinuous)
Converts spoken audio input into text.
void stopTranscription ()
Ends the active speech-to-text session.
Audio streaming
int startAudioStreaming (Microphone microphone, int bitrate, int sampleRate, AudioChannel channelCount, StreamingBufferCallback audioBufferCallback, StreamingEventCallback streamingEventCallback)
Starts streaming audio using the specified settings.
void stopAudioStreaming ()
Stops the audio session and releases all associated resources.
boolean isAudioStreaming ()
Checks if there is an ongoing audio session.
Image capture
int captureImage (ImageQuality quality)
Captures a single image with the specified quality settings.
Video streaming
int startVideoStreaming (VideoQuality quality, StreamingBufferCallback videoBufferCallback, StreamingBufferCallback audioBufferCallback, StreamingEventCallback streamingEventCallback)
Starts streaming video with audio using the specified settings.
void stopVideoStreaming ()
Stops the video session and releases all associated resources.
boolean isVideoStreaming ()
Checks if there is an ongoing video session.
Query info
Locale getUserPreferredLocale ()
Retrieves the language settings from VIVE Connect.
Error handling and exceptions
This represents an error thrown by the VIVE AI Glasses SDK.