Git Product home page Git Product logo

doc2audiobook's Introduction

doc2audiobook.py

Extract text from a document (textract) and convert it into a natural sounding synthesised speech (Cloud Text-To-Speech), which is able to leverage Deepminds Wavenet models.

Example

Input Output

Available source formats (from textract)

  • .csv
  • .doc
  • .docx
  • .eml
  • .epub
  • .gif
  • .jpg and .jpeg
  • .json
  • .html and .htm
  • .mp3
  • .msg
  • .odt
  • .ogg
  • .pdf
  • .png
  • .pptx
  • .ps
  • .rtf
  • .tiff
  • .txt
  • .wav
  • .xlsx
  • .xls

Prerequisites

GCP

  1. Select or create a Google Cloud Platform project.
  2. Enable billing for your project.
  3. Enable the Cloud Text-to-Speech API.
  4. Setup Authentication using a Service Account.

Host Machine

  1. Docker
  2. /doc2audiobook/data/input: directory to hold all input files.
  3. /doc2audiobook/data/output: directory to store all output files.
  4. /doc2audiobook/.secrets/client_secret.json: GCP authentication token.

Build

git clone [email protected]:danthelion/doc2audiobook.git
cd doc2audiobook
docker build -t doc2audiobook .

Run

Make sure to put your documents in the folder that is mapped to /data before running!

List available voices

docker run \
-v /doc2audiobook/data:/data:rw \
-v /doc2audiobook/.secrets/client_secret.json:/.secrets/client_secret.json:ro \
doc2audiobook -list-voices

Convert all documents in the mapped input folder to audiobooks using the en-GB-Standard-C voice.

docker run \
-v /doc2audiobook/data:/data:rw \
-v /doc2audiobook/.secrets/client_secret.json:/.secrets/client_secret.json:ro \
doc2audiobook --voice en-GB-Standard-C

Convert a single document in the mapped input folder to an audiobook using the en-GB-Standard-C voice.

docker run \
-v /doc2audiobook/data:/data:rw \
-v /doc2audiobook/.secrets/client_secret.json:/.secrets/client_secret.json:ro \
doc2audiobook --voice en-GB-Standard-C --input test_input.txt

doc2audiobook's People

Contributors

danthelion avatar follower46 avatar

Watchers

 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.