8000 GitHub - greg-randall/genny
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

greg-randall/genny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Genny: Audiobook Generator

This repository contains a Python script that converts text files to audiobooks. It splits the input text file into smaller chunks and processes each chunk using text-to-speech services. You can choose between a free TTS service and OpenAI's TTS API.

Features

  • Splits large text files into chunks small enough to ship off to TTS services.
  • Verifies that chunking does not alter the text content.
  • Converts text chunks to speech using either a free TTS service or OpenAI's TTS API.
  • Supports parallel processing with multiple threads.

Requirements

  • Python 3.x
  • nltk library
  • openai library
  • edge_tts library

Installation

  1. Clone the repository:

    git clone https://github.com/greg-randall/genny.git
    cd genny
  2. Install the required libraries:

    pip install -r requirements.txt

Usage

To run the script, use the following command:

python3 genny.py <inputfile> [--usefreetts true|false] [--threads <num_threads>]
  • <inputfile>: Path to the text file to be processed.
  • --usefreetts: Optional. Set to true to use the free TTS service (default) or false to use OpenAI's TTS API (make sure to add your OpenAi API key to envrioment variables).
  • --threads: Optional. Number of threads to use for parallel processing, default: 24 (note that this is not typically processor bound, it's internet bandwidth bound or requests per minute bound).

Example

python3 genny.py example.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0