Giter Site home page Giter Site logo

file-talk's Introduction

file-talk

Convert documents .pdf, .docx, .txt to audio files

file-talk input/output

This software requires three other system programs:

Also:

>pip install --pre python-docx  # for MS Word docs
>pip install argparse  # for command line help
>pip install ttkbootstrap  # for GUI

filetalk.py and filetalkgui.py
are written in Python 3.10.6

usage: filetalk.py [-h] [-v VOICE] [-s SPEED] [-p PITCH] [-mp3] [-txt] infile outfile

Converts textual content from a PDF, Word, or Text file into speech or audo files.  
REQUIRES:
"espeak-ng", "ffmpeg", and "pdftotext"

positional arguments:
  infile      input file: .txt, .pdf, or .docx only
  outfile     output file (no .ext) or "talk"

options:
  -h, --help  show this help message and exit
  -v VOICE    espeak-ng voice code. Dft en-us
  -s SPEED    espeak-ng speed 30-300 Dft 150
  -p PITCH    espeak-ng pitch 0-99 Dft 45
  -mp3        make additional mp3 output file
  -txt        make additional text output file

All of the command-line options are incorporated into the GUI version.


Command-line filetalk.py Examples:

> python3 filetalk.py sample.pdf sample  # creates sample.wav file
> python3 filetalk.py sample.docx sample  # creates sample.wav file
> python3 filetalk.py sample.txt sample  # creates sample.wav file

> python3 filetalk.py -txt sample.pdf sample  # creates sample.wav and sample.txt
> python3 filetalk.py -mp3 sample.docx sample  # creates sample.wav and sample.mp3
> python3 filetalk.py -p80 sample.pdf sample  # creates sample.wav with higher voice pitch

> python3 filetalk.py sample.pdf talk  # speaks the text in sample.pdf
> python3 filetalk.py sample.docx sample.txt  # creates sample.txt (no audio files)
> python3 filetalk.py sample.pdf sandwich  # creates sandwich.wav file

> python3 filetalk.py -ven+f3 -s250 sample.pdf talk  # female speaks the pdf very fast
> python3 filetalk.py -mp3 -ven+f3 -s250 sample.pdf sample  # wav and mp3 created

end README

file-talk's People

Contributors

mleidel avatar

Watchers

 avatar  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.