Class SamsungAIService

    Definition

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

    Samsung AI Service implementation that provides Text-to-Speech and LLM services.

    public class SamsungAIService : BaseAIService, IAIService, IDisposable, ITextToSpeechService, ILLMService
    Inheritance
    object
    BaseAIService
    SamsungAIService
    Implements
    IAIService
    IDisposable
    ITextToSpeechService
    ILLMService

    Constructors

    View Source

    SamsungAIService(SamsungAIConfiguration)

    Initializes a new instance of the SamsungAIService class with the specified configuration.

    Declaration
    public SamsungAIService(SamsungAIConfiguration config)
    Parameters
    Type Name Description
    SamsungAIConfiguration config

    The configuration for the Samsung AI Service.

    Properties

    View Source

    Capabilities

    Gets the capabilities supported by this AI service.

    Declaration
    public override ServiceCapabilities Capabilities { get; }
    Property Value
    Type Description
    ServiceCapabilities
    Overrides
    BaseAIService.Capabilities
    View Source

    ServiceName

    Gets the name of the AI service.

    Declaration
    public override string ServiceName { get; }
    Property Value
    Type Description
    string
    Overrides
    BaseAIService.ServiceName

    Methods

    View Source

    Dispose(bool)

    Releases all resources used by the AI service.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    BaseAIService.Dispose(bool)
    View Source

    GenerateTextAsync(string, Dictionary<string, object>)

    Generates a response from the LLM service asynchronously.

    Declaration
    public Task GenerateTextAsync(string message, Dictionary<string, object> options = null)
    Parameters
    Type Name Description
    string message

    The input message to be processed by the LLM.

    Dictionary<, ><string, object> options

    Optional parameters for customizing the LLM output.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    View Source

    TextToSpeechAsync(string, string, Dictionary<string, object>)

    Converts the given text to speech asynchronously and returns the audio data.

    Declaration
    public Task<byte[]> TextToSpeechAsync(string text, string voice = null, Dictionary<string, object> options = null)
    Parameters
    Type Name Description
    string text

    The text to be converted to speech.

    string voice

    Optional parameter to specify the voice type.

    Dictionary<, ><string, object> options

    Optional parameters for customizing speech output.

    Returns
    Type Description
    Task<><byte[]>

    A task representing the asynchronous operation, with a byte array of the generated audio data.

    View Source

    TextToSpeechStreamAsync(string, string, Dictionary<string, object>)

    Streams the given text as speech asynchronously.

    Declaration
    public Task TextToSpeechStreamAsync(string text, string voice, Dictionary<string, object> options)
    Parameters
    Type Name Description
    string text

    The text to be converted to speech.

    string voice

    The voice type to be used for the speech.

    Dictionary<, ><string, object> options

    Optional parameters for customizing speech output.

    Returns
    Type Description
    Task

    A task representing the asynchronous operation.

    Events

    View Source

    OnTtsFinish

    Occurs when the Text-to-Speech service finishes processing.

    Declaration
    public event EventHandler<ttsStreamingEventArgs> OnTtsFinish
    Event Type
    Type Description
    EventHandler<><ttsStreamingEventArgs>
    View Source

    OnTtsReceiving

    Occurs when the Text-to-Speech service is receiving data.

    Declaration
    public event EventHandler<ttsStreamingEventArgs> OnTtsReceiving
    Event Type
    Type Description
    EventHandler<><ttsStreamingEventArgs>
    View Source

    OnTtsStart

    Occurs when the Text-to-Speech service starts processing.

    Declaration
    public event EventHandler<ttsStreamingEventArgs> OnTtsStart
    Event Type
    Type Description
    EventHandler<><ttsStreamingEventArgs>
    View Source

    ResponseHandler

    Occurs when a response is generated by the LLM service.

    Declaration
    public event EventHandler<llmResponseEventArgs> ResponseHandler
    Event Type
    Type Description
    EventHandler<><llmResponseEventArgs>

    Implements

    IAIService
    IDisposable
    ITextToSpeechService
    ILLMService

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    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