Skip to content
프로젝트

C-Loftus/QuickPiperAudiobook

GitHub에서 보기

소개

명령어 하나로 EPUB, MOBI, TXT, PDF, HTML 등 다양한 형식의 파일을 자연스러운 음성의 오디오북으로 만들 수 있습니다.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
+10

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

QuickPiperAudiobook

English | Polski | 简体中文

Create a natural audiobook for any text content with one command.

Listen to sample output here

Installing

  1. Download the binary via one of the following methods:
    • A prebuilt release
    • go install github.com/C-Loftus/QuickPiperAudiobook@latest
    • (Or build from source using go build)
  2. Download ebook-convert and make sure it is in your PATH. (This is bundled with calibre)
  3. (Optional) Download ffmpeg for mp3 and chapter support

[!NOTE]
You don't need to have piper installed. This program manages piper and the associated models

Usage

  • Pass in either a local file or a remote URL with the proper extension
    • i.e. ./QuickPiperAudiobook test.txt
  • Specify the --chapters flag to generate mp3 chapters for epub files
    • i.e. ./QuickPiperAudiobook --chapters test.epub
  • For a full list of options use the --help flag
    • i.e. ./QuickPiperAudiobook --help

Non-English / UTF-8

  • Grab a model for your language of choice (.onnx and .json) from the piper models
    • i.e. pl_PL-gosia-medium.onnx and corresponding pl_PL-gosia-medium.onnx.json (rename if needed)
  • Put them in ~/.config/QuickPiperAudiobook/
  • Use the --speak-utf-8 and --model= flags to specify you want utf characters to be spoken with a specific model
    • i.e. ./QuickPiperAudiobook --speak-utf-8 --model=pl_PL-gosia-medium.onnx MaszynaTuringa_Wikipedia.pdf

[!NOTE]
Consider specifying this model as the default in the configuration file if you plan to use it frequently

Configuring

  • You can create a config file at ~/.config/QuickPiperAudiobook/ to specify preferred values if you do not want to specify these as cli args each time
    • i.e. you can use any arbitrary model by putting the associated .onnx and .onnx.json file for it in ~/.config/QuickPiperAudiobook/
    • A full example config can be found here
# An example for `~/.config/QuickPiperAudiobook/config.yaml`

# the default output directory to use if the user does not specify --output in the cli args
output: ~/Audiobooks
# the default model to use if the user does not specify --model in the cli args
model: "en_US-hfc_female-medium.onnx"
# output the audiobook as an mp3 file (requires ffmpeg in your PATH)
mp3: false
# generate chapter metadata when outputting mp3s (requires an epub input and ffmpeg in your PATH)
chapters: false

Notes

  • Piper does not support progress output. Long audiobooks may take a long time to generate since all computation is being done locally.
  • This repo has been tested on Linux but can also work on MacOS once an upstream bug is fixed with Piper

Support

Thank you for considering supporting this project.

I accept donations on Github or Paypal. If you would like to sponsor this project or reach out to me for business reasons, you can contact me via email or my website

관련 프로젝트 살펴보기

불러오는 중…