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:
samy kamkar
2024-07-24 12:14:00 -07:00
committed by GitHub
parent 41f142ec2c
commit c585531fae
3 changed files with 25 additions and 5 deletions

View File

@@ -69,7 +69,7 @@ func main() {
text, _ := reader.ReadString('\n')
go func() {
// stream audio from elevenlabs using the first voice we found
err = client.TTSStream(ctx, pipeWriter, text, ids[0], types.SynthesisOptions{Stability: 0.75, SimilarityBoost: 0.75})
err = client.TTSStream(ctx, pipeWriter, text, ids[0], types.SynthesisOptions{Stability: 0.75, SimilarityBoost: 0.75, Style: 0.0, UseSpeakerBoost: true})
if err != nil {
panic(err)
}