mirror of
https://github.com/taigrr/elevenlabs.git
synced 2026-04-02 03:08:57 -07:00
update to add test code
This commit is contained in:
@@ -23,6 +23,15 @@ type TTS struct {
|
||||
VoiceSettings SynthesisOptions `json:"voice_settings,omitempty"` // Voice settings are applied only on the given TTS request.
|
||||
}
|
||||
|
||||
func (so *SynthesisOptions) Clamp() {
|
||||
if so.Stability > 1 || so.Stability < 0 {
|
||||
so.Stability = 0.75
|
||||
}
|
||||
if so.SimilarityBoost > 1 || so.SimilarityBoost < 0 {
|
||||
so.SimilarityBoost = 0.75
|
||||
}
|
||||
}
|
||||
|
||||
type SynthesisOptions struct {
|
||||
Stability float64 `json:"stability"`
|
||||
SimilarityBoost float64 `json:"similarity_boost"`
|
||||
|
||||
Reference in New Issue
Block a user