// Package elevenlabs provides a Go client for the ElevenLabs TTS API. // // ElevenLabs is a text-to-speech API that generates high-quality, natural-sounding // voices for applications including voiceovers, podcasts, and video content. // // Basic usage: // // client, err := elevenlabs.NewClient(elevenlabs.Config{ // APIKey: os.Getenv("ELEVENLABS_API_KEY"), // }) // if err != nil { // log.Fatal(err) // } // // // Generate speech audio // audio, err := client.TextToSpeech(ctx, "voice-id", elevenlabs.TextToSpeechRequest{ // Text: "Hello world", // }) // if err != nil { // log.Fatal(err) // } // // // audio is []byte containing MP3 data // // The client automatically handles retries for server errors (5xx) and rate // limits (429) with exponential backoff. Use the sentinel errors (ErrRateLimit, // ErrServerError, etc.) with errors.Is() for programmatic error handling. package elevenlabs