Giter VIP home page Giter VIP logo

ttsbot's Introduction

TTSBot

Description

This project is a Discord-based Text-to-Speech (TTS) bot which allows users to play AI-generated speech within a voice channel using simple text commands.

This project leverages the ElevenLabs API:


Using TTSBot

Registration:

  • Each user must first register their ElevenLabs API key with TTSBot by sending a direct message to TTSBot containing only their ElevenLabs API key (Create an ElevenLabs account at https://beta.elevenlabs.io/sign-up → Go to https://beta.elevenlabs.io/ → Click on top right profile picture → ProfileAPI Key)
  • This is necessary since ElevenLabs only provides a limited number of characters per user for speech generation

TTS:
Speech is generated through the slash command /tts_normal /tts_normal

  • The voices field lets the user select from the available ElevenLabs voices

  • The unstable field lets the user choose whether to make the speech "normal" (false) or unstable/wacky/unpredictable (true)

  • The msg field is where the user enters the actual content to be spoken by TTSBot

  • Once each field is filled, sending the /tts_normal command will move TTSBot into the user's voice channel, where TTSBot will begin speaking

  • After speaking, TTSBot will remain in the voice channel

Misc - Leave:
The user may evict TTSBot from its voice channel through the slash command /leave_voice /leave_voice


Hosting TTSBot

First Time Setup:

  • Install basic Python requirements pip install -r requirements.txt
  • Install ffmpeg to environment apt install ffmpeg
  • Rename the file .env_example to .env after adding your bot's discord token and adding the name of your guild

To Run:

  • python3 client.py

Development Roadmap

Short-Term ToDo:

  • Reorganize Util and Speech classes for comprehensibility
  • Modify FFmpegPCMAudio (in tts_normal, etc.) to use bitstream instead of wav
  • Modify how user info (such as ElevenLabs keys) is stored
  • Add logging https://discordpy.readthedocs.io/en/latest/logging.html
  • Modify how ElevenLabs API keys are registered
  • Implement robust error handling
  • Conduct comprehensive unit tests
  • Generally reorganize dependancy handling and code format to follow some kind of standard (lol)

Long-Term ToDo:

  • Implement "One-shot" voice cloning using ElevenLabs API
  • Transition from ElevenLabs to a locally-run model
  • Implement "Deep" voice cloning with local training
  • Control TTSBot through voice commands
  • Distinguish between different voices (e.g. if Bill asks TTSBot for something, TTSBot will do that thing using Bill's stored info)

ttsbot's People

Contributors

rnofal1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.