Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

[DEPRECATED] Text to speech Discord bot using the Lyrebird API

License

Notifications You must be signed in to change notification settings

MysteryPancake/Discord-Lyrebird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THE LYREBIRD API IS NOW DEPRECATED :(

Text to speech Discord bot which used the deprecated Lyrebird API.

This bot was designed to work with Heroku, with separate web and worker applications to prevent the bot from going offline. This functionality required a MongoDB database to store authorized voices and communicate between the applications.

Alternatively, the combined version of this bot did not require setting up a database, but could only be run on a server with persistent storage. Heroku's storage is cleared every time the application is restarted. I never finished the combined version, so it is missing some features present in the separated version.

Commands

Add Voice

lyre_addvoice

Registers your voice to be used with lyre_say and lyre_share.

Your voice can only be used on the guild this command was run on.

Say

lyre_say

Generates speech using your voice, registered with lyre_addvoice.

If the bot is in a voice channel, the speech will play through this channel.

If not, the speech will be sent as an attachment.

Share

lyre_share

Creates a command through which others in your guild can generate speech using your voice.

This command will function identically to lyre_say, except others in your guild can use it.

Join

lyre_join

Joins the voice channel you are currently in.

Leave

lyre_leave

Leaves the voice channel.

Say Token

lyre_saytoken

Generates speech using a Lyrebird token provided directly.

This command does not require a database, but is not recommended as others can see your token.

Setup

  1. Create your voice.

  2. Set the environment variable LYRE_REDIRECT_URI to your computer's address. Locally, this will be http://localhost:8080. This is used for authorization.

  3. Create your Lyrebird app. Make sure Redirect URI matches LYRE_REDIRECT_URI.

  4. Set the environment variables LYRE_CLIENT_ID and LYRE_CLIENT_SECRET from the website.

  5. Create your Discord app with a Bot.

  6. Set the environment variable DISCORD_BOT_TOKEN from the website.

  7. Go to https://discordapp.com/oauth2/authorize?client_id=<CLIENT_ID>&scope=bot, with <CLIENT_ID> as your Discord app's client ID.

  8. Install Node.js: brew install node

  9. Install FFmpeg: brew install ffmpeg

  10. Install the dependencies: npm install

  11. Run the bot: npm start

  12. Hope it works!