Class SpeechGenerationRequest
Task for generating synthetic speech (text-to-speech) using the specified model.
Inheritance
SpeechGenerationRequest
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
Overrides
|
Edit this page
View Source
Locale
Declaration
public Locale? Locale { get; set; }
Property Value
|
Edit this page
View Source
ModelType
Declaration
public override ModelType ModelType { get; }
Property Value
Overrides
|
Edit this page
View Source
RequestType
The endpoint type for this
Declaration
public override RequestType RequestType { get; }
Property Value
Overrides
|
Edit this page
View Source
ResponseType
MIME type for the response. Defaults to JSON.
Declaration
public override MimeType ResponseType { get; set; }
Property Value
Overrides
|
Edit this page
View Source
Speed
Declaration
public float? Speed { get; set; }
Property Value
|
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
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
Overrides
|
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
|
Edit this page
View Source
SetLocale(Locale)
Declaration
public SpeechGenerationRequest SetLocale(Locale locale)
Parameters
| Type |
Name |
Description |
| Locale |
locale |
|
Returns
|
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
|
Edit this page
View Source
SetSupportedEngines(string)
Declaration
public SpeechGenerationRequest SetSupportedEngines(string engines)
Parameters
| Type |
Name |
Description |
| string |
engines |
|
Returns
|
Edit this page
View Source
StreamAsyncInternal()
Declaration
protected override IGenerativeStream<Delta<IAudioChunk>, IAudioAsset> StreamAsyncInternal()
Returns
Overrides
Implements
Extension Methods