0.0
The project is in a healthy, maintained state
A VERY light wrapper on top of elevenlabs's API. For people who have accounts.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

= 5.1.1
 Project Readme

elevenlabs-rb

A VERY light wrapper on top of elevenlabs's API. I've only implemented the endpoints I need for my personal project but PRs are welcome!

Installation

Install the gem and add to the application's Gemfile by executing:

$ bundle add elevenlabs-rb

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install elevenlabs-rb

Usage

For arguments see the code and elevenlab's API.

require 'elevenlabs/client'

my_client = Elevenlabs::Client.new(api_key: '679c75a9fc....')

# {"voices"=>
#   [{"voice_id"=>"21m00Tcm4TlvDq8ikWAM",
#     "name"=>"Rachel",
#     "samples"=>nil,
#     "category"=>"premade",
#     "fine_tuning"=>
#      {"model_id"=>nil,
#       "language"=>nil,
#       "is_allowed_to_fine_tune"=>false,
#       "fine_tuning_requested"=>false,
#       "finetuning_state"=>"not_started",
#       "verification_attempts"=>nil,
#       "verification_failures"=>[],
#       "verification_attempts_count"=>0,
#...SNIP!

# 
binary_response = my_client.text_to_speech(voice_id: "21m00Tcm4TlvDq8ikWAM", stability: 0.1, text: "Matz is nice and so we are nice.")

File.write('wise-words.mp3', binary_response)

Development

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

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nodanaonlyzuul/elevenlabs-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the elevenlabs-rb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.