Giter VIP home page Giter VIP logo

multitts's Introduction

MultiTTS

Text-to-Speech Conversion using ElevenLabs API

This script allows you to convert text files to speech using the ElevenLabs API. It reads text files from a specified input folder, generates speech using the API, and saves the resulting audio files in an output folder.

Requirements

Installation

  1. Clone or download the script to your local machine.

  2. Install the required Python packages by running the following command:

    pip install elevenlabs

Configuration

Before running the script, you need to set up the following variables in the script:

  • set_api_key("<YOUR_API_KEY_HERE>"): Replace <YOUR_API_KEY_HERE> with your actual ElevenLabs API key.
  • voice = "Your_Voice_id": Set Your_Voice_id to your preferred voice ID. You can find the available voice IDs in the ElevenLabs API documentation.
  • model = "elevenlabs_monolingual_v1": Set elevenlabs_monolingual_v1 to your preferred model. You can find the available models in the ElevenLabs API documentation.
  • input_folder = "path/to/input/folder": Set path/to/input/folder to the path of the folder containing your input text files.
  • output_folder = "path/to/output/folder": Set path/to/output/folder to the path where you want to save the output audio files.

Usage

  1. Place your text files in the input folder specified in the script.

  2. Open a terminal or command prompt and navigate to the directory containing the script.

  3. Run the following command to execute the script:

    python app.py
  4. The script will convert each text file in the input folder to speech using the ElevenLabs API and save the resulting audio files in the output folder.

  5. Once the script has finished processing all the files, you will find the converted audio files in the output folder.

Note

  • Ensure that you have a stable internet connection while running the script, as it requires access to the ElevenLabs API.
  • Make sure that the input and output folders exist before running the script. The script will not create the folders automatically.
  • The script uses the .txt extension to identify the input text files. Only files with the .txt extension will be processed.

License

This project is licensed under the terms of the MIT license.

multitts's People

Contributors

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