Class GENSpeechTask
Task for generating synthetic speech (text-to-speech) using the specified model.
Inheritance
object
GENSpeechTask
Assembly: .dll
Syntax
public class GENSpeechTask : GENVoiceGenerationTask<GENSpeechTask, IGENSpeechOptions, string>, IGENTask
Constructors
GENSpeechTask(string)
Declaration
public GENSpeechTask(string prompt)
Parameters
Type |
Name |
Description |
string |
prompt |
|
Properties
Language
Declaration
public SystemLanguage? Language { get; set; }
Property Value
Type |
Description |
SystemLanguage? |
|
Method
Declaration
public override string Method { get; }
Property Value
Overrides
ResponseMimeType
Declaration
public override MIMEType ResponseMimeType { get; set; }
Property Value
Type |
Description |
MIMEType |
|
Overrides
Speed
Declaration
public float? Speed { get; set; }
Property Value
Methods
ExecuteAsyncINTERNAL()
Declaration
protected override UniTask<GeneratedAudio> ExecuteAsyncINTERNAL()
Returns
Overrides
SetLanguage(SystemLanguage)
Sets the language of the synthesized speech.
This can improve pronunciation and accuracy for non-English languages.
Declaration
public GENSpeechTask SetLanguage(SystemLanguage language)
Parameters
Type |
Name |
Description |
SystemLanguage |
language |
|
Returns
SetSpeed(float)
Sets the playback speed of the synthesized voice.
Declaration
public GENSpeechTask SetSpeed(float speed)
Parameters
Type |
Name |
Description |
float |
speed |
|
Returns
StreamAsync(StreamingAudioPlayer)
Declaration
public UniTask StreamAsync(StreamingAudioPlayer streamAudioPlayer)
Parameters
Type |
Name |
Description |
StreamingAudioPlayer |
streamAudioPlayer |
|
Returns
Implements