Git Product home page Git Product logo

medium-to-speech's Introduction

medium-to-speech

Build Status Python GitHub PyPI PyPI - Downloads saythanks Donate

Medium posts to Speech.

A Python library for lazy people (like myself), who never finds time to read daily Medium posts and prefer to listen to them instead. It convert medium post to markdown using a Docker container/image then uses gTTs to interface with Google Translate's text-to-speech API which converts text to spoken MP3 files, thereafter plays the generated mp3 files with cvlc assuming it is installed.

Apt Requirements

You will need to install a few dependencies before you continue:

Linux(Debian/Ubuntu):

sudo apt install -y docker-ce mpg123 python3.6 python3.6-dev vlc

Package Installation

To install run:

python3 -m pip install -U medium-speech

Usage Example

Available arguments:

play_medium_post.py -h

usage: play_medium_post.py [-h] [--play] [--cleanup] [--speed N_SPEED]
                           [--loglevel LOG_LEVEL] [--url-post MEDIUM_URL]
                           [--file MARKDOWN_FILE]

optional arguments:
  -h, --help            show this help message and exit
  --play, -p            Play generated MP3 files.
  --cleanup, -c         Cleanup generated MP3 files.
  --speed N_SPEED, -s N_SPEED
                        Play every n'th frame only ie Play speed.
  --loglevel LOG_LEVEL  log level to use, default [INFO], options [INFO,
                        DEBUG, ERROR]
  --url-post MEDIUM_URL, -u MEDIUM_URL
                        Medium post URL.
  --file MARKDOWN_FILE  Specify a Markdown file.

Listen to a Medium post:

play_medium_post.py -ps 1 -u https://medium.com/@mmphego/how-i-managed-to-harness-imposter-syndrome-391fdb754820

Listen to Markdown file:

play_medium_post.py -ps 1 --file README.md

Oh, Thanks!

By the way... Click if you'd like to say thanks... :) else Star it.

โœจ๐Ÿฐโœจ

Contributing/Feedback

Feel free to fork it or send me PR to improve it.

medium-to-speech's People

Contributors

mmphego avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mkeyno

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.