elevenlabs

package
v0.0.0-...-47aeae3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "elevenlabs"

Variables

View Source
var (
	ErrAPIKeyRequired    error = errors.New("api key is required")
	ErrModelNameRequired error = errors.New("model name is required")
	ErrTextRequired      error = errors.New("text is required")
	ErrVoiceIdRequired   error = errors.New("voice id is required")
)

Functions

This section is empty.

Types

type ElevenlabsClient

type ElevenlabsClient struct {
	// contains filtered or unexported fields
}

func (*ElevenlabsClient) Close

func (*ElevenlabsClient) Close() error

func (*ElevenlabsClient) GetVoiceList

func (g *ElevenlabsClient) GetVoiceList(ctx context.Context) ([]Voice, error)

func (*ElevenlabsClient) Name

func (*ElevenlabsClient) Name() string

func (*ElevenlabsClient) NewTTS

func (g *ElevenlabsClient) NewTTS(model string, config *tts.Config) (tts.Model, error)

type ElevenlabsProvider

type ElevenlabsProvider struct{}
var Provider ElevenlabsProvider

func (ElevenlabsProvider) NewTTSClient

func (ElevenlabsProvider) NewTTSClient(ctx context.Context, configs ...pconf.Config) (provider.TTSClient, error)

type TtsPronunciationDictionaryLocators

type TtsPronunciationDictionaryLocators struct {
	PronunciationDictionaryID string `json:"pronunciation_dictionary_id"`
	VersionID                 string `json:"version_id"`
}

type TtsVoiceSettings

type TtsVoiceSettings struct {
	Stability       float64 `json:"stability"`
	SimilarityBoost float64 `json:"similarity_boost"`
	Style           int     `json:"style"`
	UseSpeakerBoost bool    `json:"use_speaker_boost"`
}

type Voice

type Voice struct {
	ID   string
	Name string
}

type VoiceListResponse

type VoiceListResponse struct {
	Voices []struct {
		VoiceID    string      `json:"voice_id"`
		Name       string      `json:"name"`
		Samples    interface{} `json:"samples"`
		Category   string      `json:"category"`
		FineTuning struct {
			IsAllowedToFineTune         bool          `json:"is_allowed_to_fine_tune"`
			FinetuningState             string        `json:"finetuning_state"`
			VerificationFailures        []interface{} `json:"verification_failures"`
			VerificationAttemptsCount   int           `json:"verification_attempts_count"`
			ManualVerificationRequested bool          `json:"manual_verification_requested"`
			Language                    interface{}   `json:"language"`
			FinetuningProgress          struct{}      `json:"finetuning_progress"`
			Message                     interface{}   `json:"message"`
			DatasetDurationSeconds      interface{}   `json:"dataset_duration_seconds"`
			VerificationAttempts        interface{}   `json:"verification_attempts"`
			SliceIds                    interface{}   `json:"slice_ids"`
			ManualVerification          interface{}   `json:"manual_verification"`
		} `json:"fine_tuning"`
		Labels struct {
			Description string `json:"description"`
			UseCase     string `json:"use case"`
			Accent      string `json:"accent"`
			Gender      string `json:"gender"`
			Age         string `json:"age"`
		} `json:"labels"`
		Description             interface{}   `json:"description"`
		PreviewURL              string        `json:"preview_url"`
		AvailableForTiers       []interface{} `json:"available_for_tiers"`
		Settings                interface{}   `json:"settings"`
		Sharing                 interface{}   `json:"sharing"`
		HighQualityBaseModelIds []interface{} `json:"high_quality_base_model_ids"`
		SafetyControl           interface{}   `json:"safety_control"`
		VoiceVerification       struct {
			RequiresVerification      bool          `json:"requires_verification"`
			IsVerified                bool          `json:"is_verified"`
			VerificationFailures      []interface{} `json:"verification_failures"`
			VerificationAttemptsCount int           `json:"verification_attempts_count"`
			Language                  interface{}   `json:"language"`
			VerificationAttempts      interface{}   `json:"verification_attempts"`
		} `json:"voice_verification"`
		OwnerID              interface{} `json:"owner_id"`
		PermissionOnResource interface{} `json:"permission_on_resource"`
	} `json:"voices"`
}

Jump to

Keyboard shortcuts

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