elevenlabs

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

elevenlabs implements an API client for elevenlabs (https://elevenlabs.io/docs/api-reference/text-to-speech)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client
}

func New

func New(ApiKey string, opts ...client.ClientOpt) (*Client, error)

func (*Client) TextToSpeech added in v0.0.3

func (c *Client) TextToSpeech(w io.Writer, voice, text string, opts ...Opt) (int64, error)

Return current set of voices

func (*Client) Voice added in v0.0.3

func (c *Client) Voice(Id string) (Voice, error)

Return a single voice

func (*Client) Voices added in v0.0.3

func (c *Client) Voices() ([]Voice, error)

Return current set of voices

type Opt added in v0.0.3

type Opt func(*opts) error

Opt is a function which can be used to set options on a request

func OptModel added in v0.0.3

func OptModel(v string) Opt

Set the voice model

func OptSeed added in v0.0.3

func OptSeed(v uint) Opt

Set the deterministic seed

type Voice added in v0.0.3

type Voice struct {
	Id          string        `json:"voice_id"`
	Name        string        `json:"name"`
	Description string        `json:"description,omitempty"`
	PreviewUrl  string        `json:"preview_url,omitempty"`
	Category    string        `json:"category,omitempty"`
	Settings    VoiceSettings `json:"settings"`
}

type VoiceSettings added in v0.0.3

type VoiceSettings struct {
	SimilarityBoost float32 `json:"similarity_boost"`
	Stability       float32 `json:"stability"`
	Style           float32 `json:"style,omitempty"`
	UseSpeakerBoost bool    `json:"use_speaker_boost"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL