Class SpeechGenerationRequestBase<TSelf, TPrompt, TConfig>
Inheritance
SpeechGenerationRequestBase<TSelf, TPrompt, TConfig>
Assembly: Glitch9.AIDevKit.dll
Syntax
public abstract class SpeechGenerationRequestBase<TSelf, TPrompt, TConfig> : GenerativeAudioRequest<TSelf, TPrompt, TConfig>, IGenerativeRequest, IStreamingGenerativeRequest<Delta<IAudioChunk>, IAudioAsset> where TSelf : SpeechGenerationRequestBase<TSelf, TPrompt, TConfig> where TPrompt : IPrompt where TConfig : IProviderRequestOptions
Type Parameters
| Name |
Description |
| TSelf |
|
| TPrompt |
|
| TConfig |
|
Constructors
|
Edit this page
View Source
SpeechGenerationRequestBase(TPrompt)
Declaration
protected SpeechGenerationRequestBase(TPrompt prompt)
Parameters
| Type |
Name |
Description |
| TPrompt |
prompt |
|
Properties
|
Edit this page
View Source
SimilarityBoost
Only applicable when using ElevenLabs API.
Optional. Determines how closely the AI should adhere to the original voice when attempting to replicate it.
Declaration
public double? SimilarityBoost { get; set; }
Property Value
|
Edit this page
View Source
Stability
Only applicable when using ElevenLabs API.
Optional. Determines how stable the voice is and the randomness between each generation.
Lower values introduce broader emotional range for the voice.
Higher values can result in a monotonous voice with limited emotion.
Declaration
public double? Stability { get; set; }
Property Value
|
Edit this page
View Source
Style
Only applicable when using ElevenLabs API.
Optional. Determines the style exaggeration of the voice.
This setting attempts to amplify the style of the original speaker.
This setting consumes additional computational resources and might increase latency if set to anything other than 0.
Declaration
public double? Style { get; set; }
Property Value
|
Edit this page
View Source
UseSpeakerBoost
Only applicable when using ElevenLabs API.
Optional. This setting boosts the similarity to the original speaker.
Using this setting requires a slightly higher computational load, which in turn increases latency.
Declaration
public bool? UseSpeakerBoost { get; set; }
Property Value
|
Edit this page
View Source
UseStyleExaggeration
Only applicable when using ElevenLabs API.
Optional. The use of style exaggeration in the voice output.
Declaration
public bool? UseStyleExaggeration { get; set; }
Property Value
|
Edit this page
View Source
Voice
Declaration
public string Voice { get; set; }
Property Value
Methods
|
Edit this page
View Source
SetVoice(Api, string)
Sets the voice preset name (string-based, for future compatibility).
Declaration
public TSelf SetVoice(Api api, string voice)
Parameters
Returns
|
Edit this page
View Source
SetVoice(Voice)
Declaration
public TSelf SetVoice(Voice voice)
Parameters
| Type |
Name |
Description |
| Voice |
voice |
|
Returns
|
Edit this page
View Source
ValidateRequest()
Validates the request before execution.
Override in derived classes to implement request validation logic.
Declaration
protected override void ValidateRequest()
Overrides
Implements
Extension Methods