Search Results for

    Show / Hide Table of Contents

    Class SpeechGenerationRequest

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

    Inheritance
    object
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>
    StreamingGenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, Delta<IAudioChunk>, IAudioRequestOptions>
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>
    SpeechGenerationRequest
    Implements
    IGenerativeRequest
    IStreamingGenerativeRequest<Delta<IAudioChunk>, IAudioAsset>
    Inherited Members
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.Voice
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.Stability
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.SimilarityBoost
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.Style
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.UseSpeakerBoost
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.UseStyleExaggeration
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.ValidateRequest()
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.SetVoice(Api, string)
    SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.SetVoice(Voice)
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.ResponseType
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.FileNameKey
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.OutputFormat
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.SetEncoding(AudioEncoding)
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.SetElevenLabsFormat(ElevenLabsTypes.OutputFormat)
    StreamingGenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, Delta<IAudioChunk>, IAudioRequestOptions>.StreamAsync(CancellationToken)
    StreamingGenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, Delta<IAudioChunk>, IAudioRequestOptions>.StreamAsyncInternal()
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.FileNameKey
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.FallbackModel
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ModelType
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.Api
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.Prompt
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.Model
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.N
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.Seed
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.MeasureLatency
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.OnLatencyMeasured
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.RequestedAt
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.RecordOptions
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.RecordedContext
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetModel(Api, string)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetModel(ModelBase)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetCount(int)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetN(int)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetSeed(long)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetRecordOptions(bool?, bool?, string, string, GenerationRecord, RecordMerger, Action<GenerationRecord>)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetRecordOptions(GenerationRecordOptions)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetMeasureLatency(Action<double>)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetMeasureLatency(bool, Action<double>)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.SetPlaygroundSettings(string, string, string, bool, Action<double>, Action<GenerationRecord>)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ExecuteAsync(CancellationToken)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ExecuteAsyncT<T>(CancellationToken)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ProcessPostRequestTasks<T>(Generated<T>)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ProcessPostRequestTasks(IResult)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.GetPrompt()
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.GetPromptStringToRecord()
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ResolveDownloadOptions(DownloadOptions)
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ValidateRequest()
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.GenerateDefaultFileName()
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.PrepareRequestAsync()
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.m_Api
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.Api
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.RequestType
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.HttpOptions
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.DownloadOptions
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.Sender
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.LogOptions
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ContentType
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ResponseType
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.IsCanceled
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.Stream
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SafetyIdentifier
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ServiceTier
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.Metadata
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ProviderOptions
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.Options
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetSender(string)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetLogOptions(CurlLogOptions)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetOutputPath(string)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetOutputPath(string, string)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetOutputDirectory(string)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetDownloadOptions(DownloadOptions)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetRequestMimeType(MimeType)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetResponseMimeType(MimeType)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetStream(bool)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetMetadata(ServerDictionary)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetSafetyIdentifier(string)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetProviderOptions(IAudioRequestOptions)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetSpecificOptions(IAudioRequestOptions)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ValidateRequest()
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.GetConfig<T>()
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.SetApi(Api)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ExecuteAsync(CancellationToken)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.Cancel()
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ExecuteAsyncInternal()
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ResolveDownloadOptions(DownloadOptions)
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.GenerateDefaultFileName()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.AIDevKit
    Assembly: Glitch9.AIDevKit.dll
    Syntax
    public class SpeechGenerationRequest : SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt, IAudioRequestOptions>, IGenerativeRequest, IStreamingGenerativeRequest<Delta<IAudioChunk>, IAudioAsset>

    Constructors

    | Edit this page View Source

    SpeechGenerationRequest(Prompt)

    Declaration
    public SpeechGenerationRequest(Prompt prompt)
    Parameters
    Type Name Description
    Prompt prompt

    Properties

    | Edit this page View Source

    FileNameKey

    Declaration
    protected override string FileNameKey { get; }
    Property Value
    Type Description
    string
    Overrides
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.FileNameKey
    | Edit this page View Source

    Locale

    Declaration
    public Locale? Locale { get; set; }
    Property Value
    Type Description
    Locale?
    | Edit this page View Source

    ModelType

    Declaration
    public override ModelType ModelType { get; }
    Property Value
    Type Description
    ModelType
    Overrides
    GenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, IAudioRequestOptions>.ModelType
    | Edit this page View Source

    RequestType

    The endpoint type for this

    Declaration
    public override RequestType RequestType { get; }
    Property Value
    Type Description
    RequestType
    Overrides
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.RequestType
    | Edit this page View Source

    ResponseType

    MIME type for the response. Defaults to JSON.

    Declaration
    public override MimeType ResponseType { get; set; }
    Property Value
    Type Description
    MimeType
    Overrides
    GenerativeAudioRequest<SpeechGenerationRequest, Prompt, IAudioRequestOptions>.ResponseType
    | Edit this page View Source

    Speed

    Declaration
    public float? Speed { get; set; }
    Property Value
    Type Description
    float?
    | Edit this page View Source

    SupportedEngines

    Provider-specific hint for supported synthesis engines (e.g. Amazon Polly). Used when the Voice ScriptableObject is not in the catalog and engine metadata cannot be retrieved from it directly.

    Declaration
    public string SupportedEngines { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    ExecuteAsyncInternal()

    Executes the actual task logic. Must be implemented in derived classes.

    Declaration
    protected override UniTask<Generated<IAudioAsset>> ExecuteAsyncInternal()
    Returns
    Type Description
    UniTask<Generated<IAudioAsset>>
    Overrides
    UnifiedApiRequestBase<SpeechGenerationRequest, Generated<IAudioAsset>, IAudioRequestOptions>.ExecuteAsyncInternal()
    | Edit this page View Source

    SetLanguage(SystemLanguage)

    Sets the language of the synthesized speech. This can improve pronunciation and accuracy for non-English languages.

    Declaration
    public SpeechGenerationRequest SetLanguage(SystemLanguage language)
    Parameters
    Type Name Description
    SystemLanguage language
    Returns
    Type Description
    SpeechGenerationRequest
    | Edit this page View Source

    SetLocale(Locale)

    Declaration
    public SpeechGenerationRequest SetLocale(Locale locale)
    Parameters
    Type Name Description
    Locale locale
    Returns
    Type Description
    SpeechGenerationRequest
    | Edit this page View Source

    SetSpeed(float)

    Sets the playback speed of the synthesized voice.

    Declaration
    public SpeechGenerationRequest SetSpeed(float speed)
    Parameters
    Type Name Description
    float speed
    Returns
    Type Description
    SpeechGenerationRequest
    | Edit this page View Source

    SetSupportedEngines(string)

    Declaration
    public SpeechGenerationRequest SetSupportedEngines(string engines)
    Parameters
    Type Name Description
    string engines
    Returns
    Type Description
    SpeechGenerationRequest
    | Edit this page View Source

    StreamAsyncInternal()

    Declaration
    protected override IGenerativeStream<Delta<IAudioChunk>, IAudioAsset> StreamAsyncInternal()
    Returns
    Type Description
    IGenerativeStream<Delta<IAudioChunk>, IAudioAsset>
    Overrides
    StreamingGenerativeRequest<SpeechGenerationRequest, Prompt, IAudioAsset, Delta<IAudioChunk>, IAudioRequestOptions>.StreamAsyncInternal()

    Implements

    IGenerativeRequest
    IStreamingGenerativeRequest<TEvent, TAsset>

    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.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation