Skip to main content

Medium posts as Markdown to Speech.

Project description

medium-to-speech

Build Status GitHub saythanks

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 data, 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:

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

Installation

To install run:

pip3 install -U --pre .

Usage

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... thank you! And if you'd like to say thanks... :)

✨🍰✨

Feedback

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

medium-speech-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

medium_speech-0.1.0-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file medium-speech-0.1.0.tar.gz.

File metadata

  • Download URL: medium-speech-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for medium-speech-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1711d919b3a27a0a7524c217a7b0b0a03d4a3643c888f3c22d25f211f6946e84
MD5 6044483d1d47ab2d03d6b44260f79cfd
BLAKE2b-256 bc3d7474d6f2cc5bdd9f8f8ed884ae0a8cea90e5d45fe42b1d1328955f575a6c

See more details on using hashes here.

File details

Details for the file medium_speech-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: medium_speech-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for medium_speech-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7ff1b1f6075f048a3ad175c04e6bf8bb132d325726c401da5de9cb318b65c756
MD5 915bd15841e4344338601773531ded3f
BLAKE2b-256 e1b8f3d7f60fa92af005e19c8988b0841fa1fa5df1a7962d01ddbbdc871545f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page