Important
New Version Available! Please use my new version using OmniVoice instead of f5tts; it is much better and more advanced.
Check it out here: Ebook-to-Audiobook-with-OmniVoice
Turn your eBooks into audiobooks using the F5-TTS text-to-speech model. This application allows you to upload an eBook file and a reference voice sample to generate a personalized audiobook. The app supports various eBook formats and provides advanced settings to customize the output.
Copy and paste this single command line into command prompt to get the app running locally in Docker (Nvidia card accelerated)(11GB)(can take a long time to load, check CPU usage once download is finished, if CPU usage is high, it is loading correctly):
curl -L "https://huggingface.co/wildflowerdewdrop/f5tts_offline_ebook_to_audiobook_Docker_image/resolve/main/f5tts-app-preloaded_2025-12-30.tar?download=true" -o f5tts-app-preloaded_2025-12-30.tar && docker load < f5tts-app-preloaded_2025-12-30.tar && docker run --rm -it --gpus all -p 7860:7860 f5tts_custom:latest && del f5tts-app-preloaded_2025-12-30.tar
A prebuilt Apple Silicon version is available as a .zip download with Apple Silicon GPU (Metal) acceleration support:
Download Apple Silicon F5-TTS.zip
- Voice Customization: Upload a voice sample (<15 seconds) to mimic in the generated audiobook.
- Requires 5GB of Vram
- Estimated Remaining Time: See how much time is left to finish each ebook, calculated automatically
- Multiple eBook Formats: Supports
.epub,.mobi,.pdf,.txt, and.htmlfiles. - Batch Processing: Upload multiple eBooks for batch conversion.
- Advanced Settings:
- Reference text input for more accurate voice cloning.
- Adjust speech speed.
- Customize cross-fade duration between audio chunks.
- Metadata Handling: Extracts and embeds eBook metadata and cover images into the audiobook files.
- Output Formats: Generates audiobooks with book covers embedded in
.mp3format. (.m4bformat caused play/pause issues in some audiobook players.) - User-Friendly Interface: Built with Gradio for an interactive web UI.
Frankenstein.Snapshot.Dec.11.2025.at.7.52.00.AM.mp4
These instructions will guide you through running the pre-packaged offline Text-to-Speech (TTS) Docker image using a single command. This image includes all necessary models, so it does not require an internet connection after the initial download step.
Before you begin, ensure you have the following installed and configured on your system:
- Docker Desktop: Install Docker for your operating system (Windows, macOS, or Linux). You can find it here: https://www.docker.com/products/docker-desktop/
- NVIDIA GPU Drivers: You need a compatible NVIDIA graphics card (GPU). Install the latest drivers from the NVIDIA website.
- NVIDIA Container Toolkit: This allows Docker to access your NVIDIA GPU. Installation instructions depend on your OS (primarily Linux, or WSL2 on Windows). Follow the official guide: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
- Sufficient VRAM: Ensure your NVIDIA GPU has at least 5 GB of Video RAM (VRAM) available for the application to run smoothly.
curlCommand-Line Tool: This tool is used within the single command to download the image. It's pre-installed on most Linux and macOS systems, and usually included in modern Windows 10/11. You can verify it's available by opening your terminal/command prompt and typingcurl --version.
(Note: Running this application requires a compatible NVIDIA GPU meeting the VRAM requirement, properly configured for Docker with the NVIDIA Container Toolkit.)
-
Open a Terminal or Command Prompt:
- Windows: Open Command Prompt, PowerShell, or the terminal in Windows Subsystem for Linux (WSL).
- macOS: Open the Terminal application (found in Applications > Utilities).
- Linux: Open your preferred terminal application.
-
Download, Load, and Run (Single Command):
- The single command below performs all the necessary steps sequentially: downloads the Docker image (~5.8 GB) from Hugging Face saving it temporarily, loads it into your Docker engine, starts the application container, and finally cleans up the downloaded file after you stop the container.
- This method is more robust against download interruptions than piping the download directly.
- Copy the entire command, paste it into your terminal.
- Command:
(Note: On Linux/macOS, change the final
curl -L "https://huggingface.co/jdana/f5tts_offline_ebook_to_audiobook_Docker_image/resolve/main/f5tts-app-preloaded_2025-05-29.tar" -o f5tts-app-preloaded_2025-05-29.tar && docker load < f5tts-app-preloaded_2025-05-29.tar && docker tag 21fad7b5127e f5tts:latest && docker run --rm -it --gpus all -p 7860:7860 f5tts:latest && del f5tts-app-preloaded_2025-05-29.tar
delcommand torm) - How it works:
curl -L "URL" -o filename.tar: Downloads the file completely and saves it locally.-Lfollows redirects,-ospecifies the output filename.&&: Ensures the next command runs only if the previous one was successful.docker load < filename.tar: Loads the image into Docker from the downloaded file.&&: Ensures thedocker runcommand starts only if the load was successful.docker run ...: Runs the container using thef5tts:latestimage. The--rmflag ensures the container is removed when stopped.-itruns it interactively.--gpus allprovides GPU access.-p 7860:7860maps the port.&&: Ensures the cleanup command runs only ifdocker runexits successfully (i.e., after you stop the container, typically withCtrl+C).del filename.tar(orrm filename.taron Linux/macOS): Deletes the downloaded.tarfile to save space.
- Be Patient: This command still downloads a large file (11 GB), which will take time based on your internet speed. You will see download progress from
curl. The subsequentdocker loadprocess also takes time. Wait for the command to complete the download and load steps before the application logs start appearing.
- Once the container is running (you should eventually see log messages in the terminal, including something like
* Running on local URL: http://0.0.0.0:7860), open your web browser. - Navigate to the following address:
http://localhost:7860 - You should now see the web interface for the TTS application.
- To stop the application container, go back to the terminal window where it is running.
- Press
Ctrl + C(hold the Control key and press C). - The container will stop. Because the run command included the
--rmflag, it will also be automatically removed. The final part of the single command (delorrm) should then execute to clean up the downloaded.tarfile.
These instructions guide you on how to download the f5tts Docker image once, load it into your local Docker repository, and then run it anytime without re-downloading.
- Docker Desktop (or Docker Engine) installed and running on your system.
- Command Prompt (or PowerShell).
- (Optional but likely required for this image) NVIDIA GPU drivers and the NVIDIA Container Toolkit if you plan to use GPU acceleration (
--gpus allflag).
Do these steps only once, or when you want to update to a new version of the image downloaded as a .tar file.
-
Open Command Prompt (it's often a good idea to run it as Administrator for Docker operations, though not always strictly necessary).
-
Navigate to a directory where you want to temporarily store the downloaded image archive (e.g.,
C:\DockerImages):cd C:\path\to\your\desired\folder -
Download the Docker image archive:
curl -L "https://huggingface.co/jdana/f5tts_offline_ebook_to_audiobook_Docker_image/resolve/main/f5tts-app-preloaded_2025-05-29.tar" -o f5tts-app-preloaded_2025-05-29.tar- This will download the
f5tts-app-preloaded_2025-05-29.tarfile. Wait for the download to complete as it can be a large file.
- This will download the
-
Load the image from the archive into Docker:
docker load < f5tts-app-preloaded_2025-05-29.tar- This command extracts and loads the image layers into Docker's local storage. It might take some time.
- Upon completion, it usually outputs the ID of the loaded image, for example:
Loaded image ID: sha256:21fad7b5127e....
-
Tag the loaded image with a friendly name: The image ID
21fad7b5127eis the short ID for the image within this specific tarball.docker tag 21fad7b5127e f5tts:latest
- This assigns the more memorable tag
f5tts:latestto the image. - You can verify the image is tagged correctly by running
docker imagesand looking forf5ttsin theREPOSITORYcolumn.
- This assigns the more memorable tag
-
(Optional) Delete the downloaded
.tarfile to save disk space, as the image is now stored by Docker:del f5tts-app-preloaded_2025-05-29.tar
Do these steps every time you want to use the f5tts application.
-
Open Command Prompt.
-
Run the Docker container using the tag you created:
docker run --rm -it --gpus all -p 7860:7860 f5tts:latest
--rm: Automatically removes the container when it exits.-it: Runs in interactive mode and allocates a pseudo-TTY.--gpus all: (Requires NVIDIA setup) Exposes all available NVIDIA GPUs to the container. If you don't have an NVIDIA GPU or the NVIDIA Container Toolkit, you might need to remove this flag, but the application's performance or functionality could be affected.-p 7860:7860: Maps port 7860 on your host machine to port 7860 inside the container. This allows you to access the application viahttp://localhost:7860in your web browser.f5tts:latest: Specifies the Docker image to run.
Once the container starts, you should be able to access the f5tts web interface by navigating to http://localhost:7860 in your browser. To stop the container, press Ctrl+C in the Command Prompt window where it's running.
- GPL-3.0
- This project uses code adapted from fakerybakery's Hugging Face space E2-F5-TTS and DrewThomasson's Hugging Face space ebook2audiobook. Thanks for your amazing work!
