💾 Archived View for gmi.bacardi55.io › blog › 2017 › 02 › 08 › kalliope-mpd-neuron captured on 2023-06-14 at 14:11:42. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Kalliope MPD neurons

Posted on 2017-02-08

Introduction

I was thinking about starting music by voice recognition for a while now. Since I've managed to launch my tv show via kalliope and kodi (more on that later :)), I still didn't have a way to do same for my music.

I start looking into existing solution and really liked the idea behind mopidy[1], having an MPD[2] server that also works with remote services like spotify. Meaning I could control not only my local music (as I would with a simple MPD server) but also my spotify library!

1: https://www.mopidy.com/

2: https://www.musicpd.org/

So to make this happen, I started created a simple (for now) neuron to manage an MPD server via Kalliope.

I keep the full installation / configuration I made (kalliope + mopidy) for another blog post though (:

Installation

As usual, use the following command:

    kalliope install --git-url https://github.com/bacardi55/kalliope-mpd.git

Configuration

This neuron let you launch several action. Let's look at a default neuron for using it:

      - name: "play-music"
        signals:
          - order: "start playlist {{query}}"
        neurons:
          - kalliopempd:
              mpd_action: "playlist"
              mpd_url: "xxx.xxx.xxx.xxx"
              mpd_port: "yyyy"
              mpd_random: 1
              args:
                - query

As you can see, there is an mpd_action arguments that let you choose what to do. As of now, the available commands are:

The playlist_spotify action is a bit specific to mopidy as if you want to run a "top playlist" on spotify (like top tracks everywhere in the glob) you'll need to use this action. If you know the name of your playlist, you can use the default playlist action to launch it (even for spotify playlist)

The README[3] will have the up to date list.

3: https://github.com/bacardi55/kalliope-mpd

More example are available in the sample brain file

Conclusion

Now I can start/stop music by voice and simply switch song (prev/next) or play/pause the music when needed (: I am also very pleased on how kalliope works well with music running in the background, so that the next/prev/pause commands are really usefull :).

I'll be back with a post about my full kalliope setups and configuration later when everything is finalized!

/gemlog/

Send me a gemini mention

send me an email!