Class GENSpeechTask
Task for generating synthetic speech (text-to-speech) using the specified model.
Inheritance
object
GENSpeechTask
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
Methods
ExecuteAsync()
Executes the task and returns the generated result.
Declaration
public override UniTask<GeneratedAudio> ExecuteAsync()
Returns
Overrides
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
SetSpeed(float)
Sets the playback speed of the synthesized voice.
Declaration
public GENSpeechTask SetSpeed(float speed)
Parameters
Type |
Name |
Description |
float |
speed |
|
Returns
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
StreamAsync(StreamAudioPlayer)
Declaration
public UniTask StreamAsync(StreamAudioPlayer streamAudioPlayer)
Parameters
Type |
Name |
Description |
StreamAudioPlayer |
streamAudioPlayer |
|
Returns
Implements
Extension Methods