Search Results for

    Show / Hide Table of Contents

    Class DefaultTextToSpeechService

    Inheritance
    object
    GenerativeServiceBase
    DefaultTextToSpeechService
    Implements
    ITextToSpeechService
    IGenerativeService<string, IAudioAsset, ITextToSpeechOptions>
    IStreamingTextToSpeechService
    ITextToSpeech
    IStreamingGenerativeService<string, Delta<IAudioChunk>, IAudioAsset, ITextToSpeechOptions>
    IDisposable
    Inherited Members
    GenerativeServiceBase.CancelAsync()
    GenerativeServiceBase.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public sealed class DefaultTextToSpeechService : GenerativeServiceBase, ITextToSpeechService, IGenerativeService<string, IAudioAsset, ITextToSpeechOptions>, IStreamingTextToSpeechService, ITextToSpeech, IStreamingGenerativeService<string, Delta<IAudioChunk>, IAudioAsset, ITextToSpeechOptions>, IDisposable

    Methods

    | Edit this page View Source

    GenerateAsync(string, ITextToSpeechOptions, CancellationToken)

    Generates a final output asynchronously.

    Declaration
    public UniTask<Generated<IAudioAsset>> GenerateAsync(string input, ITextToSpeechOptions settings, CancellationToken ct = default)
    Parameters
    Type Name Description
    string input

    The input data.

    ITextToSpeechOptions settings

    The generation settings.

    CancellationToken ct

    The cancellation token.

    Returns
    Type Description
    UniTask<Generated<IAudioAsset>>

    The generated result.

    | Edit this page View Source

    StreamAsync(string, ITextToSpeechOptions, CancellationToken)

    Starts a streaming generation request asynchronously.

    Declaration
    public UniTask<IGenerativeStream<Delta<IAudioChunk>, IAudioAsset>> StreamAsync(string input, ITextToSpeechOptions settings, CancellationToken ct = default)
    Parameters
    Type Name Description
    string input

    The input data.

    ITextToSpeechOptions settings

    The generation settings.

    CancellationToken ct

    The cancellation token.

    Returns
    Type Description
    UniTask<IGenerativeStream<Delta<IAudioChunk>, IAudioAsset>>

    A stream handle that emits deltas and eventually provides the final output.

    Implements

    ITextToSpeechService
    IGenerativeService<TInput, TOutput, TSettings>
    IStreamingTextToSpeechService
    ITextToSpeech
    IStreamingGenerativeService<TInput, TDelta, TOutput, TSettings>
    IDisposable

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.TryDispose(IDisposable)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation