Giter Site home page Giter Site logo

audd-cli's Introduction

audd-cli

Record audio and use the AudD music recognition API from the command line.

The audd scripts queries the AudD API. This repository also contains audd-notif which uses audd and libnotify to return the match result.

Dependencies:

The audd script requires:

In addition to the above the audd-notif script requires:

Installation

Manual

Just clone this repo and place the audd and audd-notif scripts on your $PATH.

Arch (AUR):

Using your favourite AUR helper:

$ paru -S audd-cli-git

Usage

$ audd -h
Usage: audd [OPTION]... [FILE]
Query the AudD music recognition API.

Get a free API token at: https://audd.io/

The API token can be read from file:
$ echo "api-token" > "~/.config/audd/api_token"

If no FILE is provided, a recording is made using the AUDIO_SOURCE.

Usage:
    -h                    Show this message and exit.
    -a API_KEY            AudD API token.
    -s AUDIO_SOURCE       ffmpeg audio input source, (default: "default").
    -t RECORDING_TIME     Length of recording time, in seconds, (default: 3).
    -r API_RETURN         AudD API return parameter, see https://docs.audd.io/,
                          (default: "apple_music,spotify").
    -o                    Use the "recognizeWithOffset" endpoint.

To use audd you will need to get an API key from audd. Provide the API key with either the -a option or by writing the API key to ${XDG_CONFIG_HOME:-$HOME/.config}/audd/api_token:

$ echo "api-token" > "~/.config/audd/api_token"

audd can perform a query using an audio file (the file shouldn't be too large, typically shorter than 20 seconds), or if no file is provided, it will record an audio sample from the provided audio source (-s option).

You can use ffmpeg -sources pulse to list available sources.

I recommend reading the API docs to understand the -r and the -o options.

audd-cli's People

Contributors

loiccoyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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