Class SoundEffectGenerationRequest
Task for generating sound effects based on a text prompt.
public class SoundEffectGenerationRequest : AudioGenerationRequest<SoundEffectGenerationRequest, Prompt>, IGenerativeRequest, ISequentialRequest
- Inheritance
-
objectGenerativeRequest<SoundEffectGenerationRequest, Prompt, Generated<AudioClip>, float[], IGenerativeAudioEvent>SoundEffectGenerationRequest
- Implements
- Inherited Members
- Extension Methods
Constructors
SoundEffectGenerationRequest(Prompt)
public SoundEffectGenerationRequest(Prompt prompt)
Parameters
promptPrompt
Properties
Api
The cloud service provider associated with this task. Automatically resolved from the selected model if not explicitly set.
public override Api Api { get; }
Property Value
DurationSeconds
public double? DurationSeconds { get; set; }
Property Value
- double?
ModelType
public override ModelType ModelType { get; }
Property Value
Type
public override FluentApiRequestType Type { get; }
Property Value
Methods
CreateStreamAsyncInternal()
protected override UniTask<IRESTStream<IGenerativeAudioEvent>> CreateStreamAsyncInternal()
Returns
- UniTask<IRESTStream<IGenerativeAudioEvent>>
ExecuteAsyncInternal()
protected override UniTask<Generated<AudioClip>> ExecuteAsyncInternal()
Returns
- UniTask<Generated<AudioClip>>
SetDuration(double)
Sets the duration of the generated sound effect in seconds.
public SoundEffectGenerationRequest SetDuration(double durationSeconds)
Parameters
durationSecondsdouble