GithubHelp home page GithubHelp logo

macrophone's Introduction

Macrophone

After asking you for a song, Macrophone fetches lyrics from MetroLyrics and reads them in a voice of your choosing.

How It Works

When Macrophone receives your preferred song and artist, it formats your selection and pastes it into a MetroLyrics URL. Once it grabs your song's lyrics page, it strips away all of the HTML to reveal the words to your song. That text is then sent to the OS X say command, a useful text-to-speech program bundled in with the system's default software.

Usage

Download the file and add execution permissions to the script. If you're unfamiliar with the command-line interface, you can open up the Terminal application on your computer and copy+paste the following commands:

cd ~/Downloads
curl -o macrophone.sh https://raw.githubusercontent.com/calebgross/macrophone/master/macrophone.sh
sudo chmod +x macrophone.sh

Invoke the program by simply typing:

./macrophone.sh

When prompted to select a song, artist, or voice, enter your choice followed by the "Enter" key. Don't worry about capitalization—your input will be processed and formatted automatically. Note that some song names might be formatted in an odd way on the MetroLyrics site; if your selection doesn't work after a few tries, try checking their website to see how they've listed the song. You can also pass the song, artist, and voice as command-line arguments instead:

./macrophone.sh "wrecking ball" "miley cyrus" "alex"

Your most recent selections are saved in /tmp/.macrophone_config. For example, simply hitting "Enter" after each of the following lines:

Enter song [Wrecking Ball]:  
Enter artist [Miley Cyrus]:  
Enter voice (for a list of voices, type help) [Alex]:

will tell your computer to use those settings. You should then see:

Now singing Wrecking Ball by Miley Cyrus in the voice of Alex (hit ctrl+c to cancel)...

To-do

  • Search across multiple lyrics sites
  • Print lyrics as they're being read (probably unrealistic, but fun to suggest)
  • Implement error handling on user input

macrophone's People

Contributors

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