GithubHelp home page GithubHelp logo

speaker's Introduction

Speaker

Convert a text file in an mp3 audio file. Yeah! I know, it's probably useless for you, but I found the idea pretty fun, and it's enough for me ;) I would like to thank Zach Holman for all his crazy ideas. He gave me inspiration to write this tiny shell script.

See a real use case on my blog: www.williamdurand.fr.

Dependencies

You need the say command which is bundled with Mac OSX, and ffmpeg you can install by running:

brew install --use-clang --HEAD ffmpeg

Usage

USAGE:
  ./speaker [-h] [-d <output directory>] <filename>

Use It With Jekyll

The aim of this script is to convert markdown files to mp3 files in a Jekyll environment. To provide an audio access to your readers, you'll have to add an HTML5 <audio> tag. To be compatible with the most part of browsers, you should include html5media:

// _layouts/default.html
<script src="http://api.html5media.info/1.1.5/html5media.min.js"></script>
// _layouts/post.html
<audio src="/mp3/{{ page.id | remove_first:'/' | replace:'/','-' }}.mp3" controls preload></audio>

Then, add the provided pre-commit hook (hooks/pre-commit) to your local repository, and configure Git:

git config hooks.speaker.bin=/path/to/speaker

You're done. Next time you'll commit a _posts/*.markdown file, you'll get a fresh mp3 audio file.

License

Speaker is released under the MIT License. See the bundled LICENSE file for details.

speaker's People

Contributors

willdurand avatar themouette avatar cordoval avatar

Stargazers

Matt Dickenson avatar Diogo Alves avatar Fabrice Kabongo avatar Victor Hugo Bernardes de Souza avatar Marcos Sader avatar Brandon Burkeen avatar Fabian Steiner avatar Esen Sagynov avatar Yoann Sculo avatar  avatar  avatar  avatar Gordon Franke avatar Ludovic Fleury avatar Andréia Bohner avatar Dirk Sidney Jansen avatar

Watchers

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