An empathetic music recommendation system pipeline
Project description
Introduction
This project aims to create an open source music recommendation toolkit with an API-first philiosophy. API-first means that user do no need to download a lot of data before they can start working with Troi -- all the needed data should ideally live in online APIs, making it very easy for someone to get started hacking on music recommendations.
To accomplish this goal, we, the MetaBrainz Foundation, have created and hosted a number of data-sets that can be accessed as a part of this project. For instance, the more stable APIs are hosted on our Labs API page.
The ListenBrainz project offers a number of data sets:
- Collaborative filtered recordings that suggest what recordings a user should listen to based on their previous listening habits.
- User statistics that were derived from users recent listening habits.
We will continue to build and host more datasets as time passes. If an API endpoint becomes useful to a greater number of people we will elevate these API endpoints to officially supported endpoints that we ensure are up to date on online at all times.
The project is named after Deanna Troi.
Documentation
Full documentation for Troi is available at troi.readthedocs.org.
Installation for end users
So far we've not uploaded Troi bundles to PyPi -- please use the installation instructions for developers below.
Installation for Development
Linux and Mac
virtualenv -p python3 .ve
source .ve/bin/activate
pip3 install .[tests]
troi --help
Windows
virtualenv -p python .ve
.ve\Scripts\activate.bat
pip install .[tests]
troi --help
Basic commands
List available patches:
troi list
Generate a playlist using a patch:
troi playlist --print [patch-name]
If the patch requires arguments, running it with no arguments will print a usage statement, e.g.
$ troi playlist --print area-random-recordings
Usage: area-random-recordings [OPTIONS] AREA START_YEAR END_YEAR
Generate a list of random recordings from a given area.
AREA is a MusicBrainz area from which to choose tracks.
START_YEAR is the start year.
END_YEAR is the end year.
Options:
--help Show this message and exit.
Running tests
troi test
troi test -v
troi test -v <file to test>
Building Documentation
To build the documentation locally:
pip install .[docs]
cd docs
make clean html
References for the future path of Troi
Troi is a rather primitive tool at this point in time, but as the MetaBrainz projects gather more data, we can improve how we generate playlists. A good overview of the technology and psychology behind playlists and recommendations, see:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file troi-2024.1.26.0.tar.gz
.
File metadata
- Download URL: troi-2024.1.26.0.tar.gz
- Upload date:
- Size: 94.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ccecad1662b65faa702c770092ef6b84f06979469d57248ef6f3f6f920437a3 |
|
MD5 | 940af06ff49ec7897447b43ff074a8db |
|
BLAKE2b-256 | 61fa640b6dc9a2d058006feb7d7dbabf66440012c2234823e7e3d6b75e7dee7b |
File details
Details for the file troi-2024.1.26.0-py3-none-any.whl
.
File metadata
- Download URL: troi-2024.1.26.0-py3-none-any.whl
- Upload date:
- Size: 88.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85c66ab9a5a86f5e738471b315f73cf4aadbbabe7a26ca536331894fbd55985e |
|
MD5 | e8c1e3e2fab2bb7caeb894ba899ffc0b |
|
BLAKE2b-256 | 8156ad82715d83dad7a866ff6f482ea05bb7880cc371c9eeb786d886e9fce491 |