eleven-next-gen
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Eleven Next Gen

A polyfill package for new APIs missing from ElevenLabs API.

NOTE: Use only for exploration. DO NOT use in production. It uses your personal bearer token which is temporary by nature.

NOTE 2: Once APIs are implemented by the ElevenLabs team they will be deprecated from this package.

Installation

npm i --save eleven-next-gen

Usage

import fs from 'fs';
import { init, speechToSpeech } from 'eleven-next-gen';

const VOICE_ID = 'VOICE_ID';
const TOKEN = 'YOUR_BEARER_TOKEN';
const INPUT_FILE = './input.wav';
const OUTPUT_FILE = './output.wav';

const run = async () => {
  init(TOKEN);
  const audioData = await fs.promises.readFile(INPUT_FILE);
  const response = await speechToSpeech(audioData, VOICE_ID);
  const writer = fs.createWriteStream(OUTPUT_FILE);
  response.data.pipe(writer);
};

run();

Readme

Keywords

none

Package Sidebar

Install

npm i eleven-next-gen

Weekly Downloads

3

Version

0.0.4

License

GPL-3.0

Unpacked Size

14.8 kB

Total Files

18

Last publish

Collaborators

  • dht