Giter Club home page Giter Club logo

audiobook_maker's Introduction

Audiobook Maker

This repo utilizes SOTA AI voice generation tools such as Tortoise and RVC to generate the audio required to make an audiobook. To my knowledge, Tortoise and RVC combined replicates speech in a way that is currently unparalleled to anything else that exists out there that is open-sourced and able to be ran locally. Eleven labs is absolutely fantastic... one of the best IMO, but it's not "free" and it's not open-source

There are two ways to install this, via Package or Manually. If you don't have any

Features:

✔️ Sentence generation using Tortoise -> RVC

✔️ RVC AI Voice model compatibility (V1 & V2 as well as 40k & 48k trained models)

✔️ Generation of an entire text file with some basic sentence parsers and sorters

✔️ Selectively playback sentences by clicking and choosing them

✔️ Selectively regenerate audio for sentences by clicking and choosing them

✔️ Progress saving and continuing for audiobook generation in case of a crash or want to continue later

✔️ Audiobook loading from previous generations

✔️ Export of Audiobooks to a single wave file

✔️ Audiobook can be updated with a new text file in case sentences need to be changed or order adjusted

To-do:

  • Add additional languages (limited to only English ATM)SS
  • Add an option to convert audiobook to another voice
  • Add a stop generation button
  • Add a Timer
  • Add more advanced playback and regeneration tools
    • Highlight sentences for generation later (will need to do some type of edit to the json structure so that even if you close out, they are still highlighted)
    • Find a way to do "multiple speakers" for dialogue in the book (might involve a new tab where users can select sentences to regenerate)
    • Auto sentence regeneration and comparison using whisper (https://github.com/maxbachmann/RapidFuzz/)

Prerequisites:

Package Installation

Make sure you have Tortoise installed and working as stated in prerequisites

  1. Head over to the releases tab and download the audiobook maker 7zip folder from my HuggingFace Repo:

  2. Unzip using 7zip (or your preferred 7zip unpacker)

  3. Inside of the audiobook maker folder, right click and edit tort.yaml with a voice that is working in Tortoise TTS (more details in video)

  4. Run the start_package.bat

  5. Before generating an audio, make sure that Tortoise TTS is also running in the background so that it can generate audio.

Manual Installation:

Make sure you have Tortoise installed and working as stated in prerequisites

  1. Open a powershell/cmd window, clone, and then cd into the repo:
git clone https://github.com/JarodMica/audiobook_maker.git
cd audiobook_maker
  1. Download and extract rvc to the audiobook_maker folder:

    • Link: https://huggingface.co/Jmica/rvc/resolve/main/rvc_lightweight.7z
      • Extract and double-click into rvc_lightweight, and then copy the rvc folder into the audiobook_maker folder
      • It should look like audiobook_maker/rvc and NOT like audiobook_maker\rvc_lightweight
    • You can delete rvc_lightweight.7z and the folder once the copy is finished
  2. Set-up and activate virtual environment

python -m venv venv
venv\Scripts\activate
  1. Install pytorch using command below (recommended) or get from https://pytorch.org/get-started/locally/:

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117

  1. Install requirements:

pip install -r requirements.txt

pip install -r rvc/requirements.txt (if you get an error here, check to make sure you copied the rvc folder correctly)

pip install https://huggingface.co/Jmica/rvc/resolve/main/fairseq-0.12.2-cp310-cp310-win_amd64.whl

pip install git+https://github.com/JarodMica/rvc-tts-pipeline.git@lightweight#egg=rvc_tts_pipe

  1. Download and install ffmpeg: https://ffmpeg.org/download.html

    • Place ffmpeg.exe and ffprobe.exe inside of audiobook_maker OR make sure they are in your environment path variable
  2. Place whatever RVC AI voices (.pth) you want into the voice_models directory and indexes into voice_indexes

Acknowledgements

I am able to build these tools thanks to all of the fantastic open source repos out there, borrowing from different projects to get this all frankensteined and hashed together. Without these, it wouldn't be possible for me to have gotten the functionality needed to create such a fantastic tool:

audiobook_maker's People

Contributors

jarodmica 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.