Skip to content

shane-t/menuridae

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Menuridae

Unofficial lyrebird.ai API

This is not affiliated with lyrebird.ai, may break without warning, and may violate their terms of service to use.

The generate() method allows you to send a text string and returns a promise that resolves to the URL (on S3) of the generated TTS audio (in MP3 format).

To start, you must sign up with lyrebird.ai and train your voice model there.

Install this package with npm install menuridae

Example

Assuming you have a .env file in the format:

EMAIL=blah@blah.com
PASSWORD=blah

You can run it this like:

const request = require('request');
const dotenv = require('dotenv');
const fs = require('fs');
const Client = require('../index');

dotenv.config();

async function generateFromText(utterance) {
  const client = new Client;
  await client.login(process.env.EMAIL, process.env.PASSWORD);
  const url = await client.generate({ texts : [ utterance ] });

  return url;
}

generateFromText('Hello world')
.then(url => request(url).pipe(fs.createWriteStream('./output.mp3')));

(try running node examples/generateAndDownload)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published