Code Monkey home page Code Monkey logo

elevenlabs-nodejs's Introduction

Elevenlabs Nodejs

Buy Me A Coffee

The Nodes JS API for ElevenLabs text-to-speech. Unleash the power of our cutting-edge technology to generate realistic, captivating speech in a wide range of languages.

Installation

npm i elevenlabs-m2k --save

or

yarn add elevenlabs-m2k

Getting Started

Get your ElevenLabs API key from here.

const apiKey = process.env.API_KEY;
const { ElevenlabsAPI } = require('elevenlabs-m2k');
const elevenlabs = new ElevenlabsAPI(apiKey);

Get Voices

elevenlabs.getVoices().then(async (voices) => {
    const { voice_id, name } = voices[0];
    console.log(name, 'is speaking', `(${voice_id})`);
});

Get Sample Voice Audio URL

elevenlabs.getSample(voice_id).then(url => console.log(url));

Get Models

elevenlabs.getModels().then(async (data) => {
    const { model_id, name } = data.models[0];
    console.log(name, '=', `(${model_id})`);
});

Get Audio

const audio = await elevenlabs.getAudio("Hello World", voice_id); // Get array buffer

elevenlabs-nodejs's People

Contributors

m2kdevelopments avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.