Table of Contents

Class SpeechGenerationRequest

Namespace
Glitch9.AIDevKit

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

public class SpeechGenerationRequest : SpeechGenerationRequestBase<SpeechGenerationRequest, Prompt>, IGenerativeRequest, ISequentialRequest
Inheritance
object
SpeechGenerationRequest
Implements
Inherited Members
Extension Methods

Constructors

SpeechGenerationRequest(Prompt)

public SpeechGenerationRequest(Prompt prompt)

Parameters

prompt Prompt

Properties

Language

public SystemLanguage? Language { get; set; }

Property Value

SystemLanguage?

ModelType

public override ModelType ModelType { get; }

Property Value

ModelType

ResponseMimeType

public override MimeType ResponseMimeType { get; set; }

Property Value

MimeType

Speed

public float? Speed { get; set; }

Property Value

float?

Type

public override FluentApiRequestType Type { get; }

Property Value

FluentApiRequestType

Methods

CreateStreamAsyncInternal()

protected override UniTask<IRESTStream<IGenerativeAudioEvent>> CreateStreamAsyncInternal()

Returns

UniTask<IRESTStream<IGenerativeAudioEvent>>

ExecuteAsyncInternal()

protected override UniTask<Generated<AudioClip>> ExecuteAsyncInternal()

Returns

UniTask<Generated<AudioClip>>

SetLanguage(SystemLanguage)

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

public SpeechGenerationRequest SetLanguage(SystemLanguage language)

Parameters

language SystemLanguage

Returns

SpeechGenerationRequest

SetSpeed(float)

Sets the playback speed of the synthesized voice.

public SpeechGenerationRequest SetSpeed(float speed)

Parameters

speed float

Returns

SpeechGenerationRequest