AI Dev Kit
Search Results for

    Show / Hide Table of Contents

    Class GENSpeechTask

    Task for generating synthetic speech (text-to-speech) using the specified model.

    Inheritance
    object
    GENTask<GENSpeechTask, string, GeneratedAudio>
    GENAudioOutputTask<GENSpeechTask, string>
    GENSpeechTask
    Implements
    IGENTask
    Inherited Members
    GENAudioOutputTask<GENSpeechTask, string>.outputMimeType
    GENAudioOutputTask<GENSpeechTask, string>.SetEncoding(AudioEncoding)
    GENTask<GENSpeechTask, string, GeneratedAudio>.token
    GENTask<GENSpeechTask, string, GeneratedAudio>.enableHistory
    GENTask<GENSpeechTask, string, GeneratedAudio>.isCanceled
    GENTask<GENSpeechTask, string, GeneratedAudio>.outputMimeType
    GENTask<GENSpeechTask, string, GeneratedAudio>.Cancel()
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetOption(string, object)
    GENTask<GENSpeechTask, string, GeneratedAudio>.TryGetOption<T>(string, out T)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetModel(Model)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetCount(int)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetOutputPath(string)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetSender(string)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetIgnoreLogs(bool)
    GENTask<GENSpeechTask, string, GeneratedAudio>.EnablePromptHistory(bool)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetTextToTarget(GeneratedText)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetImageToTarget(GeneratedImage)
    GENTask<GENSpeechTask, string, GeneratedAudio>.SetAudioToTarget(GeneratedAudio)
    GENTask<GENSpeechTask, string, GeneratedAudio>.ExecuteAsync()
    Namespace: Glitch9.AIDevKit
    Assembly: .dll
    Syntax
    public class GENSpeechTask : GENAudioOutputTask<GENSpeechTask, string>, IGENTask

    Constructors

    GENSpeechTask(string, Object)

    Declaration
    public GENSpeechTask(string prompt, UnityEngine.Object target = null)
    Parameters
    Type Name Description
    string prompt
    Object target

    Properties

    outputMimeType

    Declaration
    public override MIMEType outputMimeType { get; set; }
    Property Value
    Type Description
    MIMEType
    Overrides
    GENAudioOutputTask<GENSpeechTask, string>.outputMimeType

    Methods

    ExecuteAsync()

    Executes the task and returns the generated result.

    Declaration
    public override UniTask<GeneratedAudio> ExecuteAsync()
    Returns
    Type Description
    UniTask<GeneratedAudio>
    Overrides
    GENTask<GENSpeechTask, string, GeneratedAudio>.ExecuteAsync()

    SetSeed(uint)

    Sets a fixed seed to make generation deterministic and repeatable.

    Declaration
    public GENSpeechTask SetSeed(uint seed)
    Parameters
    Type Name Description
    uint seed
    Returns
    Type Description
    GENSpeechTask

    SetSpeed(float)

    Sets the playback speed of the synthesized voice.

    Declaration
    public GENSpeechTask SetSpeed(float speed)
    Parameters
    Type Name Description
    float speed
    Returns
    Type Description
    GENSpeechTask

    SetVoice(Voice)

    Sets the voice preset name (string-based, for future compatibility).

    Declaration
    public GENSpeechTask SetVoice(Voice voice)
    Parameters
    Type Name Description
    Voice voice
    Returns
    Type Description
    GENSpeechTask

    StreamAsync(StreamAudioPlayer)

    Declaration
    public UniTask StreamAsync(StreamAudioPlayer streamAudioPlayer)
    Parameters
    Type Name Description
    StreamAudioPlayer streamAudioPlayer
    Returns
    Type Description
    UniTask

    Implements

    IGENTask

    Extension Methods

    FluentAPIExtensions.SetOutputFormat(GENSpeechTask, ElevenLabsOutputFormat)
    FluentAPIExtensions.SetAspectRatio<TTask>(TTask, AspectRatio)
    FluentAPIExtensions.SetPersonGeneration<TTask>(TTask, PersonGeneration)
    FluentAPIExtensions.SetSize<T>(T, ImageSize)
    In this article
    Back to top Generated by DocFX