Skip to content

yzaimoglu/elevenlabs-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

ElevenLabs Go Client

Unofficial Go Client for the ElevenLabs API

Report Bug . Request Feature

Contributors Issues License

A Go client for interacting with the ElevenLabs API, providing easy-to-use methods for the endpoints for Administration, Conversational AI and advanced features like TTS, STT and other ElevenLabs features.

Features

This project is currently work in progress and not all of the endpoints are supported.

  • Administration
  • Conversational AI
    • Agents
  • Text to Speech
  • Speech to Text
  • Text to Dialogue
  • Voice Changer
  • Sound Effects
  • Audio Isolation
  • Text to Voice
  • Dubbing
  • Audio Native
  • Voices
  • Forced Alignment

Installation

go get github.com/yzaimoglu/elevenlabs-go

Usage

package main

import (
    "fmt"
    "log"

    elevenlabs "github.com/yzaimoglu/elevenlabs-go"
)

func main() {
	// Create a new ElevenLabs API client
    // The Environment can either be EnvironmentProduction, EnvironmentProductionUS, EnvironmentProductionEU or EnvironmentProductionIndia
	client, err := elevenlabs.NewClient("<YOUR_API_KEY>", elevenlabs.EnvironmentProductionEU)
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}

    // Use a method that calls the API (Listing all Conversational AI agents here)
    agents, err := client.ConversationalAI.Agents.ListAgents()
    if err != nil {
        log.Fatalf("Error fetching agents: %v", err)
    }

    for _, a := range agents {
        fmt.Printf("Agent Name: %s (ID: %s)\n", a.Name, a.AgentId)
    }
}

Documentation

Full API documentation:

This client aims to be a 1:1 wrapper for the official ElevenLabs API endpoints. Refer to the code and GoDoc for detailed usage examples.

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Commit changes: git commit -m 'Add my feature'
  4. Push to branch: git push origin feat/my-feature
  5. Create a Pull Request

License

BSD-3 License

Acknowledgments

About

Unofficial Go Client for the ElevenLabs API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages