{"id":18991793,"url":"https://github.com/drewthomasson/ebook2audiobookpiper-tts","last_synced_at":"2025-04-22T11:41:47.591Z","repository":{"id":255433459,"uuid":"848881538","full_name":"DrewThomasson/ebook2audiobookpiper-tts","owner":"DrewThomasson","description":"Converts ebooks into audiobooks with piper-tts","archived":false,"fork":false,"pushed_at":"2024-10-30T19:07:13.000Z","size":20528,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-30T20:21:30.722Z","etag":null,"topics":["audiobook-creator","audiobooks","docker","multilingual","piper-tts","tts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DrewThomasson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T15:19:03.000Z","updated_at":"2024-10-30T19:07:17.000Z","dependencies_parsed_at":"2024-08-30T00:27:55.943Z","dependency_job_id":"54f6c138-7d28-44de-8515-5ede31f05c53","html_url":"https://github.com/DrewThomasson/ebook2audiobookpiper-tts","commit_stats":null,"previous_names":["drewthomasson/ebook2audiobookpiper-tts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrewThomasson%2Febook2audiobookpiper-tts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrewThomasson%2Febook2audiobookpiper-tts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrewThomasson%2Febook2audiobookpiper-tts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrewThomasson%2Febook2audiobookpiper-tts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrewThomasson","download_url":"https://codeload.github.com/DrewThomasson/ebook2audiobookpiper-tts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223722110,"owners_count":17191915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audiobook-creator","audiobooks","docker","multilingual","piper-tts","tts"],"created_at":"2024-11-08T17:15:10.035Z","updated_at":"2024-11-08T17:15:10.681Z","avatar_url":"https://github.com/DrewThomasson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📚 eBook to Audiobook Converter with Piper-tts\n\nConvert eBooks to audiobooks effortlessly using a Docker container. This project leverages Calibre for eBook conversion and Piper-tts for text-to-speech, all wrapped in a Gradio interface.\n\n## 🌟 Features\n\n- **eBook Conversion:** Converts various eBook formats to text using Calibre.\n- **Text-to-Speech:** High-quality TTS using eSpeak-ng with customizable voice, speed, and pitch.\n- **Language Support:** Includes multiple languages and accents for TTS.\n- **User-Friendly Interface:** Easy-to-use Gradio interface accessible via your web browser.\n- **Dockerized:** Run the entire setup with a single Docker command.\n- **High Speed** Get High speed audiobook generation on even a low end laptop.\n\n\n## 🌐 Supported Languages\n\n- **Arabic** (ar_JO)\n- **Catalan** (ca_ES)\n- **Czech** (cs_CZ)\n- **Welsh** (cy_GB)\n- **Danish** (da_DK)\n- **German** (de_DE)\n- **Greek** (el_GR)\n- **English** (en_GB, en_US)\n- **Spanish** (es_ES, es_MX)\n- **Finnish** (fi_FI)\n- **French** (fr_FR)\n- **Hungarian** (hu_HU)\n- **Icelandic** (is_IS)\n- **Italian** (it_IT)\n- **Georgian** (ka_GE)\n- **Kazakh** (kk_KZ)\n- **Luxembourgish** (lb_LU)\n- **Nepali** (ne_NP)\n- **Dutch** (nl_BE, nl_NL)\n- **Norwegian** (no_NO)\n- **Polish** (pl_PL)\n- **Portuguese** (pt_BR, pt_PT)\n- **Romanian** (ro_RO)\n- **Russian** (ru_RU)\n- **Serbian** (sr_RS)\n- **Swedish** (sv_SE)\n- **Swahili** (sw_CD)\n- **Turkish** (tr_TR)\n- **Ukrainian** (uk_UA)\n- **Vietnamese** (vi_VN)\n- **Chinese** (zh_CN)\n\n## 🎥 Demo\n\n\nhttps://github.com/user-attachments/assets/7d2328b9-ac65-4485-b1b3-fe1006f041c6\n\n\n\n## 🖥️ Gradio Web Gui\n\u003cimg width=\"1363\" alt=\"Screenshot 2024-08-30 at 12 17 41 AM\" src=\"https://github.com/user-attachments/assets/8515b9b2-1db2-4944-b12b-c3a6bfde1535\"\u003e\n\n\u003cimg width=\"1365\" alt=\"Screenshot 2024-08-30 at 12 17 51 AM\" src=\"https://github.com/user-attachments/assets/0dc196a9-5853-4194-9151-46fd92eff811\"\u003e\n\n\n\n### Open in free google colab!\n[![Free Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DrewThomasson/ebook2audiobookpiper-tts/blob/main/notebooks/ebook2audiobook_piper_tts.ipynb)\n\n## 🚀 Quick Start\n\nTo quickly get started with this eBook to Audiobook converter, simply run the following Docker command:\n\n```bash\ndocker run -it -p 7860:7860 --platform=linux/amd64 registry.hf.space/drewthomasson-ebook2audiobookpiper-tts:latest python app.py \n```\n\nWith Nvidia GPU\n```bash\ndocker run -it --gpus all -p 7860:7860 --platform=linux/amd64 registry.hf.space/drewthomasson-ebook2audiobookpiper-tts-gpu:latest python app.py\n```\n\nThis will start the Gradio interface on port `7860`. You can access it by navigating to `http://localhost:7860` in your web browser.\n\n## 🌐 Offline Mode\n\nFor a fully offline experience with all Piper TTS voice models bundled, use the following Docker command:\n\n```bash\ndocker run -it --rm -p 7860:7860 athomasson2/ebook2audiobookpiper-tts:latest_large\n```\n\nThis version comes preloaded with every Piper TTS voice model, ensuring that you can convert eBooks to audiobooks without needing an internet connection. Perfect for uninterrupted usage in any environment!\n\n\n## 🎛️ Gradio Interface Customizations\n\nIn the Gradio interface, you can customize the following settings for your audiobook conversion:\n\n- **Speed:** Adjust the reading speed from 80 to 450 words per minute (default is 170).\n- **Pitch:** Modify the pitch of the voice from 0 to 99 (default is 50).\n- **Voice Selection:** Choose from a variety of voices and accents available in eSpeak-ng.\n- **Audiobook Player:** Listen to the converted audiobook directly in the interface.\n- **Download Audiobook:** Download the generated audiobook files directly to your device.\n\n## 🛠️ Building the Docker Image\n\nIf you prefer to build the Docker image yourself, use the following Dockerfile:\n\n```dockerfile\n# Use an official Python runtime as a parent image\nFROM python:3.10-slim\n\n# Install system dependencies for Calibre and ffmpeg\nRUN apt-get update \u0026\u0026 \\\n    apt-get install -y calibre ffmpeg git nano wget unzip git \u0026\u0026 \\\n    rm -rf /var/lib/apt/lists/*\n\n# Set the working directory\nWORKDIR /app\n\n#No do a git clone instead\nRUN git clone https://github.com/DrewThomasson/ebook2audiobookpiper-tts.git\n\n# Install Python packages\nRUN pip install --no-cache-dir piper-tts pydub nltk beautifulsoup4 ebooklib tqdm spacy gradio\n\n# Download the spaCy language model\nRUN python -m spacy download en_core_web_sm\n\n\n# Replace the NLTK folder with the backup\nRUN echo \"Replacing the nltk folder with the nltk folder backup I pulled from a docker image, just in case the nltk servers ever mess up.\" \u0026\u0026 \\\n    ZIP_URL=\"https://github.com/DrewThomasson/VoxNovel/blob/main/readme_files/nltk.zip?raw=true\" \u0026\u0026 \\\n    TARGET_DIR=\"/usr/local/lib/python3.10/site-packages\" \u0026\u0026 \\\n    TEMP_DIR=$(mktemp -d) \u0026\u0026 \\\n    wget -q -O \"$TEMP_DIR/nltk.zip\" \"$ZIP_URL\" \u0026\u0026 \\\n    unzip -q \"$TEMP_DIR/nltk.zip\" -d \"$TEMP_DIR\" \u0026\u0026 \\\n    rm -rf \"$TARGET_DIR/nltk\" \u0026\u0026 \\\n    mv \"$TEMP_DIR/nltk\" \"$TARGET_DIR/nltk\" \u0026\u0026 \\\n    rm -rf \"$TEMP_DIR\" \u0026\u0026 \\\n    echo \"NLTK Files Replacement complete.\"\n\n\n# Set the working directory\nWORKDIR /app/ebook2audiobookpiper-tts\n\n# NO USE THIS Default command\nCMD [\"python\", \"gradio_gui.py\"]\n#To run this docker on your computer run docker run -it athomasson2/ebook2audiobookpiper-tts\n```\n\nTo build the image, run:\n\n```bash\ndocker build -t athomasson2/ebook2audiobookpiper-tts:latest .\n```\n\n## 🎉 Enjoy\n\nExplore the full power of this converter by running your Docker container. Customize the settings in the Gradio interface to suit your needs.\n\nFor more details and updates, visit the [DockerHub repository](https://hub.docker.com/repository/docker/athomasson2/ebook2audiobookpiper-tts).\n\n\n## 🙏 Special Thanks\n\n- **Piper-tts**: [Piper-tts on GitHub]([https://github.com/espeak-ng/espeak-ng](https://github.com/rhasspy/piper))\n- **Calibre**: [Calibre Website](https://calibre-ebook.com)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewthomasson%2Febook2audiobookpiper-tts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrewthomasson%2Febook2audiobookpiper-tts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewthomasson%2Febook2audiobookpiper-tts/lists"}