elevenlabs

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleSpeech

func HandleSpeech(c echo.Context, options mo.Option[types.SpeechRequestOptions]) mo.Result[any]

func HandleVoices

func HandleVoices(c echo.Context, options mo.Option[types.VoicesRequestOptions]) mo.Result[any]

Types

type ListVoicesResponse

type ListVoicesResponse struct {
	Voices []Voice `json:"voices"`
}

type Voice

type Voice struct {
	VoiceID                 string                   `json:"voice_id"`
	Name                    string                   `json:"name"`
	Category                string                   `json:"category"`
	Labels                  map[VoiceLabelKey]string `json:"labels"`
	AvailableForTiers       []string                 `json:"available_for_tiers"`
	HighQualityBaseModelIds []string                 `json:"high_quality_base_model_ids"`
	Samples                 []VoiceSample            `json:"samples"`
	FineTuning              VoiceFineTuning          `json:"fine_tuning"`
	Description             string                   `json:"description"`
	PreviewURL              string                   `json:"preview_url"`
	Settings                map[VoiceSettingsKey]any `json:"settings"`
	VerifiedLanguages       []VoiceVerifiedLanguage  `json:"verified_languages"`
	SafetyControl           string                   `json:"safety_control"`
}

type VoiceFineTuning

type VoiceFineTuning struct {
	IsAllowedToFineTune bool `json:"is_allowed_to_fine_tune"`
	State               struct {
		ElevenMultilingualV2 string `json:"eleven_multilingual_v2"`
	} `json:"state"`
	VerificationFailures        []string `json:"verification_failures"`
	VerificationAttemptsCount   int      `json:"verification_attempts_count"`
	ManualVerificationRequested bool     `json:"manual_verification_requested"`
}

type VoiceLabelKey

type VoiceLabelKey = string
const (
	VoiceLabelKeyAccent      VoiceLabelKey = "accent"
	VoiceLabelKeyAge         VoiceLabelKey = "age"
	VoiceLabelKeyGender      VoiceLabelKey = "gender"
	VoiceLabelKeyUseCase     VoiceLabelKey = "use_case"
	VoiceLabelKeyDescription VoiceLabelKey = "description"
)

type VoiceSample

type VoiceSample struct {
	SampleID  string `json:"sample_id"`
	FileName  string `json:"file_name"`
	MimeType  string `json:"mime_type"`
	SizeBytes int    `json:"size_bytes"`
	Hash      string `json:"hash"`
}

type VoiceSettingsKey

type VoiceSettingsKey = string
const (
	VoiceSettingKeyStability       VoiceSettingsKey = "stability"
	VoiceSettingKeySimilarityBoost VoiceSettingsKey = "similarity_boost"
	VoiceSettingKeyStyle           VoiceSettingsKey = "style"
	VoiceSettingKeyUseSpeakerBoost VoiceSettingsKey = "use_speaker_boost"
	VoiceSettingKeySpeed           VoiceSettingsKey = "speed"
)

type VoiceVerifiedLanguage

type VoiceVerifiedLanguage struct {
	Language string `json:"language"`
	ModelID  string `json:"model_id"`
	Accent   string `json:"accent"`
}

Jump to

Keyboard shortcuts

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