Home > @magiclane/maps-sdk > Voice

Voice class

Voice information object.

Provides metadata about a voice asset: its name, language and file location. Returned voices can be used with TTS and playback APIs.

It is usually obtained via SdkSettings.voice after setting the desired voice using SdkSettings.setVoiceByPath or SdkSettings.setTTSVoiceByLanguage.

Signature:

export declare class Voice extends GemAutoreleaseObject 

Extends: GemAutoreleaseObject

Constructors

Constructor

Modifiers

Description

(constructor)(id)

Creates a Voice instance.

Properties

Property

Modifiers

Type

Description

fileName

readonly

string

Returns the absolute file path for the voice asset on the device.

language

readonly

Language

Returns the Language associated with this voice.

name

readonly

string

Returns the human-readable name of the voice.

pointerId

readonly

number | bigint

type

readonly

VoiceType

Returns the voice type (VoiceType) indicating human or computer voice.

voiceId

readonly

number

Returns the internal identifier for this voice.