0.0.4 • Published 2 years ago

eleven-next-gen v0.0.4

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
2 years ago

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();
0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago