Class LipSyncController

    Definition

    Namespace:
    Tizen.AIAvatar
    Assembly:
    Tizen.AIAvatar.dll

    A controller class used to manage lip sync functionality for avatars.

    public class LipSyncController : IDisposable
    Inheritance
    object
    LipSyncController

    Constructors

    View Source

    LipSyncController(Avatar)

    Initializes a new instance of the LipSyncController class.

    Declaration
    public LipSyncController(Avatar avatar)
    Parameters
    Type Name Description
    Avatar avatar

    Properties

    View Source

    CurrentTTSClient

    Gets the current Text-To-Speech client associated with the Lip Sync Controller.

    Declaration
    public TtsClient CurrentTTSClient { get; }
    Property Value
    Type Description
    TtsClient

    Methods

    View Source

    DeinitializeMic()

    Declaration
    public void DeinitializeMic()
    View Source

    DeInitializeTTS()

    Deinitializes the Text-To-Speech system for use with the Lip Sync Controller.

    Declaration
    public void DeInitializeTTS()
    View Source

    Dispose()

    Releases unmanaged resources used by this instance.

    Declaration
    public void Dispose()
    View Source

    GetSupportedVoices()

    Returns a list of supported voices for the Text-To-Speech system.

    Declaration
    public List<VoiceInfo> GetSupportedVoices()
    Returns
    Type Description
    List<><VoiceInfo>
    View Source

    InitializeMic()

    Declaration
    public void InitializeMic()
    View Source

    InitializeTTS()

    Initializes the Text-To-Speech system for use with the Lip Sync Controller.

    Declaration
    public void InitializeTTS()
    View Source

    PauseMic()

    Declaration
    public void PauseMic()
    View Source

    PauseTTS()

    Pauses the currently playing Text-To-Speech audio.

    Declaration
    public void PauseTTS()
    View Source

    PlayLipSync(byte[], int)

    Plays the given audio with LipSync and returns whether it was successful or not. If the lip syncer is null, logs an error and returns false. The lipSyncer plays the audio using the provided byte array and sample rate.

    Declaration
    public bool PlayLipSync(byte[] audio, int sampleRate = 24000)
    Parameters
    Type Name Description
    byte[] audio

    The audio data to be played in a byte array format.

    int sampleRate

    The sampling rate of the audio data, default value is 24000 Hz.

    Returns
    Type Description
    bool
    View Source

    PlayLipSync(string, int)

    Plays the given audio with LipSync and returns whether it was successful or not. If the lip syncer is null, logs an error and returns false. The lipSyncer plays the audio using the provided byte array and sample rate.

    Declaration
    public bool PlayLipSync(string path, int sampleRate = 24000)
    Parameters
    Type Name Description
    string path
    int sampleRate

    The sampling rate of the audio data, default value is 16000 Hz.

    Returns
    Type Description
    bool
    View Source

    PlayPreparedTTS()

    Plays the previously prepared Text-To-Speech audio data.

    Declaration
    public bool PlayPreparedTTS()
    Returns
    Type Description
    bool

    True if playback started successfully, otherwise False.

    View Source

    PlayTTS(string, string, EventHandler)

    Asynchronously converts the given text into speech using the specified language code and plays the resulting audio once it's ready.

    Declaration
    public bool PlayTTS(string text, string lang = "ko_KR", EventHandler ttsReadyFinishedCallback = null)
    Parameters
    Type Name Description
    string text

    The text to convert into speech.

    string lang

    The two-letter ISO 639-1 language code to use for converting the text into speech (default is Korean - ko_KR).

    EventHandler ttsReadyFinishedCallback

    An optional callback that will be invoked when the TTS process is complete.

    Returns
    Type Description
    bool

    True if asynchronous conversion was initiated successfully, otherwise False.

    View Source

    PlayTTS(string, string)

    Converts the given text into speech using the specified language code and plays the resulting audio immediately.

    Declaration
    public bool PlayTTS(string text, string lang = "ko_KR")
    Parameters
    Type Name Description
    string text

    The text to convert into speech.

    string lang

    The two-letter ISO 639-1 language code to use for converting the text into speech (default is Korean - ko_KR).

    Returns
    Type Description
    bool

    True if playback started successfully, otherwise False.

    View Source

    PlayTTS(string, VoiceInfo)

    Converts the given text into speech using the specified voice info and plays the resulting audio immediately.

    Declaration
    public bool PlayTTS(string text, VoiceInfo voiceInfo)
    Parameters
    Type Name Description
    string text

    The text to convert into speech.

    VoiceInfo voiceInfo

    The voice info to use for converting the text into speech.

    Returns
    Type Description
    bool

    True if playback started successfully, otherwise False.

    View Source

    PlayTTSAsync(string, VoiceInfo, EventHandler)

    Asynchronously converts the given text into speech using the specified voice info and plays the resulting audio once it's ready.

    Declaration
    public bool PlayTTSAsync(string text, VoiceInfo voiceInfo, EventHandler ttsReadyFinishedCallback = null)
    Parameters
    Type Name Description
    string text

    The text to convert into speech.

    VoiceInfo voiceInfo

    The voice info to use for converting the text into speech.

    EventHandler ttsReadyFinishedCallback

    An optional callback that will be invoked when the TTS process is complete.

    Returns
    Type Description
    bool

    True if asynchronous conversion was initiated successfully, otherwise False.

    View Source

    PrepareTTS(string, string, EventHandler)

    Prepares the Text-To-Speech engine to synthesize speech from the provided text and language code.

    Declaration
    public bool PrepareTTS(string text, string lang = "ko_KR", EventHandler ttsReadyFinishedCallback = null)
    Parameters
    Type Name Description
    string text

    The text to convert into speech.

    string lang

    The two-letter ISO 639-1 language code to use for converting the text into speech (default is Korean - ko_KR).

    EventHandler ttsReadyFinishedCallback

    An optional callback that will be invoked when the TTS process is complete.

    Returns
    Type Description
    bool

    True if preparation was successful, otherwise False.

    View Source

    PrepareTTS(string, VoiceInfo, EventHandler)

    Prepares the Text-To-Speech engine to synthesize speech from the provided text and voice info.

    Declaration
    public bool PrepareTTS(string text, VoiceInfo voiceInfo, EventHandler ttsReadyFinishedCallback = null)
    Parameters
    Type Name Description
    string text

    The text to convert into speech.

    VoiceInfo voiceInfo

    The voice info to use for converting the text into speech.

    EventHandler ttsReadyFinishedCallback

    An optional callback that will be invoked when the TTS process is complete.

    Returns
    Type Description
    bool

    True if preparation was successful, otherwise False.

    View Source

    ResumeMic()

    Declaration
    public void ResumeMic()
    View Source

    StartMic()

    Declaration
    public void StartMic()
    View Source

    StopMic()

    Declaration
    public void StopMic()
    View Source

    StopTTS()

    Stops the currently playing Text-To-Speech audio.

    Declaration
    public void StopTTS()

    Events

    View Source

    TTSReadyFinished

    Occurs when text-to-speech synthesis has finished and the audio data is ready to play.

    Declaration
    public event EventHandler TTSReadyFinished
    Event Type
    Type Description
    EventHandler

    Extension Methods

    EXamlExtensions.LoadFromEXaml<T>(T, string)
    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    EXamlExtensions.LoadFromEXamlPath<TXaml>(TXaml, string)
    EXamlExtensions.LoadFromEXamlPath<T>(T, Type)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX