Class SoundEffectGenerationRequest
Task for generating sound effects based on a text prompt.
Inheritance
GenerativeRequest<SoundEffectGenerationRequest, Weighted<Prompt>, IAudioAsset, IAudioRequestOptions>
StreamingGenerativeRequest<SoundEffectGenerationRequest, Weighted<Prompt>, IAudioAsset, Delta<IAudioChunk>, IAudioRequestOptions>
SoundEffectGenerationRequest
Inherited Members
Namespace: Glitch9.AIDevKit
Assembly: Glitch9.AIDevKit.dll
Syntax
public class SoundEffectGenerationRequest : GenerativeAudioRequest<SoundEffectGenerationRequest, Weighted<Prompt>, IAudioRequestOptions>, IGenerativeRequest, IStreamingGenerativeRequest<Delta<IAudioChunk>, IAudioAsset>
Constructors
| Edit this page View SourceSoundEffectGenerationRequest(Weighted<Prompt>)
Declaration
public SoundEffectGenerationRequest(Weighted<Prompt> prompt)
Parameters
| Type | Name | Description |
|---|---|---|
| Weighted<Prompt> | prompt |
SoundEffectGenerationRequest(string, float?)
Declaration
public SoundEffectGenerationRequest(string prompt, float? promptStrength = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | prompt | |
| float? | promptStrength |
Properties
| Edit this page View SourceApi
The cloud service provider associated with this task. Automatically resolved from the selected model if not explicitly set.
Declaration
public override Api Api { get; }
Property Value
| Type | Description |
|---|---|
| Api |
Overrides
| Edit this page View SourceDurationSeconds
Declaration
public double? DurationSeconds { get; set; }
Property Value
| Type | Description |
|---|---|
| double? |
FileNameKey
Declaration
protected override string FileNameKey { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
| Edit this page View SourceModelType
Declaration
public override ModelType ModelType { get; }
Property Value
| Type | Description |
|---|---|
| ModelType |
Overrides
| Edit this page View SourceRequestType
The endpoint type for this
Declaration
public override RequestType RequestType { get; }
Property Value
| Type | Description |
|---|---|
| RequestType |
Overrides
Methods
| Edit this page View SourceExecuteAsyncInternal()
Executes the actual task logic. Must be implemented in derived classes.
Declaration
protected override UniTask<Generated<IAudioAsset>> ExecuteAsyncInternal()
Returns
| Type | Description |
|---|---|
| UniTask<Generated<IAudioAsset>> |
Overrides
| Edit this page View SourceSetDuration(double)
Sets the duration of the generated sound effect in seconds.
Declaration
public SoundEffectGenerationRequest SetDuration(double durationSeconds)
Parameters
| Type | Name | Description |
|---|---|---|
| double | durationSeconds |
Returns
| Type | Description |
|---|---|
| SoundEffectGenerationRequest |
StreamAsyncInternal()
Declaration
protected override IGenerativeStream<Delta<IAudioChunk>, IAudioAsset> StreamAsyncInternal()
Returns
| Type | Description |
|---|---|
| IGenerativeStream<Delta<IAudioChunk>, IAudioAsset> |