mirror of
https://github.com/taigrr/elevenlabs.git
synced 2026-04-02 03:08:57 -07:00
Support command line text & new API attributes (#8)
* support `style` and `use_speaker_boost` API attrs * support optional command line string as text * print out time it took to run
This commit is contained in:
@@ -31,11 +31,19 @@ func (so *SynthesisOptions) Clamp() {
|
||||
if so.SimilarityBoost > 1 || so.SimilarityBoost < 0 {
|
||||
so.SimilarityBoost = 0.75
|
||||
}
|
||||
if so.Style > 1 || so.Style < 0 {
|
||||
so.Style = 0.0
|
||||
}
|
||||
if so.UseSpeakerBoost != true && so.UseSpeakerBoost != false {
|
||||
so.UseSpeakerBoost = true
|
||||
}
|
||||
}
|
||||
|
||||
type SynthesisOptions struct {
|
||||
Stability float64 `json:"stability"`
|
||||
SimilarityBoost float64 `json:"similarity_boost"`
|
||||
Style float64 `json:"style"`
|
||||
UseSpeakerBoost bool `json:"use_speaker_boost"`
|
||||
}
|
||||
|
||||
type SharingOptions struct {
|
||||
|
||||
Reference in New Issue
Block a user