Skip to content

dreamingtulpa/elevenlabs-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElevenLabs Ruby client

This is a Ruby client for the ElevenLabs API.

Installation

Add this line to your application's Gemfile:

gem 'elevenlabs-ruby'

Usage

Grab your token from your ElevenLabs account and authenticate by configuring api_token:

ElevenLabs.configure do |config|
  config.api_key = "your_api_token"
end

Checkout their API docs for available endpoints.

client = ElevenLabs::Client.new(api_key: 'xxxxxxxxxx')
voices = client.get('voices')
voice_id = voices['voices'].first['voice_id']
speech = client.post("text-to-speech/#{voice_id}", { text: 'your text' }) # returns a binary string

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

About

Ruby client for elevenlabs.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages