Skip to content

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.

License

Notifications You must be signed in to change notification settings

M2KDevelopments/elevenlabs-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published