Skip to main content

AI autotagger source for beets (http://beets.io).

Project description

Beets AI Sauce Plugin

build status PyPI - Version

Because your tunes deserve a little extra flavor.

Let artificial intelligence decipher and enhance the mysterious metadata of your music tracks.

Who Needs This? (Definitely You)

  • You: The person who once gazed at your MP3 folder and thought, "My beats need more AI jazz hands!"
  • Also You: If you trust AI more than your friend who can't stop labeling everything "Track 1".
  • Definitely You: If you own folders full of tracks from bootlegs, unknown rips, or suspect compilation albums.

Features

  • Auto-Metadata Magic: Automatically retrieve and correct track and album metadata using AI-generated suggestions.
  • Cleanup Crew: Strip away unnecessary embellishments like "Free Download" in titles or SHOUTCAPS, giving your library a polished appearance.
  • Extensible System: Leverage AI configurations and prompts custom tailored for your library needs.

Installation

Prerequisites

  • Beets: Make sure you have Beets installed (pip install beets),
  • AI Service API Key: Get an API key from your preferred AI service provider (e.g., OpenAI, Deepseek).
    • Any service that supports openAI endpoints should work.

Plugin Setup

  1. Installation: Obtain the sauce by installing the plugin via pip:
    pip install beets-aisauce
    
  2. Configuration: Add the plugin to your Beets configuration file (config.yaml/beets config -e) with your AI provider details:
     plugins: 
       - aisauce
    
     aisauce:
         providers:
             - id: openai
               model: gpt-4o
               api_key: YOUR_API_KEY_HERE
               api_base_url: https://api.openai.com/v1
    
  3. Execute the Ai Sauce: Import your tracks through Beets to start receiving AI-enhanced metadata suggestions.

Advanced Usage

  • Custom Rules: Sometimes you have specific metadata correction rules that you want to apply. You can modify the default user and system prompts by adding a source to your configuration file:
    aisauce:
        providers:
            - id: openai
              model: gpt-4o
              api_key: YOUR_API_KEY_HERE
    
        sources:
            - provider_id: openai
              user_prompt: '
                Additional rules:
                - Replace any occurrences of Vulgar or inappropriate words with "**sauced**".
                '
    
  • Multiple sources can be defined allowing you to test different prompts or configurations for different types of music or metadata corrections and models.

Contributing

Great ideas welcome! Especially if they include more puns. Open a PR or send us a message in a bottle (GitHub issues also work).

License

This project is licensed under the MIT License—meaning you can do almost anything, but please don't sue us if the AI names your tracks "Untitled Jam 42."

Development

The following sections are for developers who want to contribute to the project. Feel free to skip if you're just here for the AI sauce.

Installation for Development

Clone the repository and install the package in editable mode:

git clone
pip install -e .[dev]

Running Tests

To run the tests, you can use pytest. Make sure you have the necessary dependencies installed:

pytest .

Running mypy locally

Running mypy local is a bit tricky due to the namespace packages used in this project. To run mypy, you need to specify the --namespace-packages and --explicit-package-bases flags.

mypy  --namespace-packages --explicit-package-bases .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beets_aisauce-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beets_aisauce-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file beets_aisauce-0.1.0.tar.gz.

File metadata

  • Download URL: beets_aisauce-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for beets_aisauce-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67748cd60ba4e1937db698c3d7c39dcd618a72edf66893140e4e50d1ee725410
MD5 beb448d8e639b9f0a53f1e21f2a6ba85
BLAKE2b-256 3f5b38e484b55ed480b543454a2b270f73d71ee01c26642585b973f87d96bbfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for beets_aisauce-0.1.0.tar.gz:

Publisher: auto-release.yml on metasauce/beets-aisauce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file beets_aisauce-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: beets_aisauce-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for beets_aisauce-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbacab785a642b9ed949ddf93b1696f22f41ba0d08ade87f5c96e152c6d0dbf9
MD5 9b73b9967ac12406043d46f0633b4adc
BLAKE2b-256 7707e724c0f77bcee1a82885b0d5f0fe9618bf1738c84b55929c480abe6c50cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for beets_aisauce-0.1.0-py3-none-any.whl:

Publisher: auto-release.yml on metasauce/beets-aisauce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page