Git Product home page Git Product logo

amzn-music-skill's Introduction

DEPRECATED - this skill no longer works: Amazon Music now has mandatory two-factor-authentication which I will not implement

AMZN Music Player Makes Mycroft play your amaz*n music library as if its name was Alexa :-)

About

This skill requires an Amaz*n Music account and a subscription of type "music unlimited" or "prime music" - even if you want to stream music from your own library only.

After skill is installed is you must either:

a) enter your login credentials at home.mycroft.ai > Skills > Amzn music WARNING: with this option your Amaz*n username and password will be stored i) on a server hosted by mycroft.ai and ii) in clear text in the skills 'settings.json' file.

b) run './credentials.py' in the skills directory and enter your login credentials there. In this case your credentials will be stored encoded & pickled in file 'credentials.store' - this option is recommended if you care for privacy. NOTE: file 'credentials.store' must be owned by mycroft:mycroft - either run credentials.py as user 'mycroft' or sudo chown mycroft:mycroft credentals.store afterwards.

NOTE: this was tested only on Mycroft Mark-1 and PiCroft (both running Debian Jessie) and will probably run (not tested yet) on PiCroft with Debian Stretch. Most likely this will not run on Ubuntu or other OS without tweaking requirements.sh at least (any assistance here is welcome)

NOTE: this will install 'VLC media player' as a requirement, which is a approx. 70MB download an will require additinal 250MB on your sd-card when unpacked...

Examples

  • "Hey Alexa Mycroft, play the song purple rain by prince on amaz*n music"
  • "Hey Mycroft, play the album 25 by adele"
  • "Hey Mycroft, play something by the foo fighters"
  • "Hey Mycroft, play some jazz"

b.t.w.: German is supported too

Credits

Dominik (@domcross)

@Jaffa for the amaz*n music api python library

@forslund and the rest of the Mycroft Dev team for inspiration and code from spotify-skill

Troubleshooting

In case you receive authentication errors you must go to Amaz*n Music website and re-confirm your account.

Known issues

Mycroft-Core has a requirement for python-vlc (version==1.1.2), probably you have to "sudo mycroft-pip uninstall python-vlc" and then again "sudo mycroft-pip install pyhton-vlc==1.1.2"

The MP3-stream is encoded with 22KHz sampling rate. The same stream-URL played with VLC on my desktop (iMac) plays with 44KHz.

Sometimes the audio service gets broken and Mycroft will no longer play the MP3 stream. A reboot of your Mycroft device helps in that case...

The Amaz*n music service seems to have a limit on maximum concurrent connections and/or number of request over a certain time period. If no music is played watch your logs for error messages...

Category

Music

Tags

#amzn #music

amzn-music-skill's People

Contributors

domcross avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

msgpo shufflecode

amzn-music-skill's Issues

Auth issue

It appears I'm being asked to resolve a captcha when launching the skill:

12:49:10.171 - SKILLS - DEBUG - {"type": "detach_skill", "data": {"skill_id": "amzn-music-skill.domcross:"}, "context": null}
12:49:10.171 - mycroft.skills.core:load_skill:159 - ERROR - Failed to load skill: amzn-music-skill.domcross
Traceback (most recent call last):
  File "/opt/mycroft-core/mycroft/skills/core.py", line 143, in load_skill
    raise e
  File "/opt/mycroft-core/mycroft/skills/core.py", line 139, in load_skill
    skill.initialize()
  File "/opt/mycroft/skills/amzn-music-skill.domcross/__init__.py", line 44, in initialize
    self.am = AmazonMusic(credentials=[self.username, self.password])
  File "/opt/mycroft/skills/amzn-music-skill.domcross/amazonmusic.py", line 101, in __init__
    r = self._authenticate(r)
  File "/opt/mycroft/skills/amzn-music-skill.domcross/amazonmusic.py", line 151, in _authenticate
    raise Exception("Unable to handle captcha: {}".format(tag))
Exception: Unable to handle captcha: [<source data-refresh-url="/ap/captcha?appAction=SIGNIN&amp;captchaType=audio" id="mp3-file" src="https://opfcaptcha-prod.s3.amazonaws.com/766a9db4dc34460182989f40a8f98697.jpg?AWSAccessKeyId=AKIAILUZGWMFHRLBJ3ZA&amp;Expires=1548701648&amp;Signature=IMiwNfqLzkuwAuyGBWtF77T1wpk%3D" type="audio/mpeg"/>]
12:49:10.174 - SKILLS - DEBUG - {"type": "mycroft.skills.loading_failure", "data": {"path": "/opt/mycroft/skills/amzn-music-skill.domcross", "id": "amzn-music-skill.domcross"}, "context": null}

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.