Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

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

func connect () throws

Initiates a connection with VIVE AI Glasses.

func disconnect ()

Requests to disconnect from VIVE AI Glasses.

func isConnected () -> Bool

Checks the current connection status.

Text to speech (TTS)

func speakText (text: String, locale: Locale) async throws -> Int

Converts provided text into spoken audio output.

Speech to text (STT)

func startTranscription (bContinuous: Bool) async throws -> Int

Converts spoken audio input into text.

func stopTranscription ()

Ends the active speech-to-text session.

Audio streaming

func startAudioStreaming (microphone: Microphone, bitrate: Int, sampleRate: Int, channelCount: AudioChannel, onAudioData: (_ sampleBuffer: CMSampleBuffer) -> Void, onStreamingEvent: (_ event: StreamingEvent) -> Void) async throws ->Int

Starts streaming audio using the specified settings.

func stopAudioStreaming ()

Stops the audio session and releases all associated resources.

func isAudioStreaming () -> Bool

Checks if there is an ongoing audio session.

Image capture

func captureImage (quality: ImageQuality) async throws ->Int

Captures a single image with the specified quality settings.

Video streaming

func startVideoStreaming (videoquality: VideoQuality, onVideoData: (_ sampleBuffer: CMSampleBuffer) -> Void, onAudioData: (_ sampleBuffer: CMSampleBuffer) -> Void, onStreamingEvent: (_ event: StreamingEvent) -> Void) async throws ->Int

Starts streaming video with audio using the specified settings.

func stopVideoStreaming ()

Stops the video session and releases all associated resources.

func isVideoStreaming () -> Bool

Checks if there is an ongoing video session.

Query info

func getUserPreferredLocale () async throws -> Locale

Retrieves the language settings from VIVE Connect.

Error handling and exceptions

enum ViveGlassError

This represents an error thrown by the VIVE AI Glasses SDK.