Giter Site home page Giter Site logo

musion's Introduction

MUSION, a toolbox for music information retrieval and music signal processing.

A collection of MIR open-source inference tools, with a unified and concise { Python interface | CLI | GUI }.

Current tools

separate music source separation
Separate songs into "drums", "bass", "other", "vocals"

struct music structure analysis / music segmentation Detect chorus part for pop songs

transcribe automatic music transcription
Only support for piano transcription now

Installation

  1. Download ONNX model files from https://zenodo.org/record/8183131, and put them in the corresponding folders.
  2. Install locally.
pip install .
  1. Support cuda acceleration. Install it if you would like optimal runtime performance.

Example Usage

All the tools use the same procedure and method, only different at tool name.
Here is a example for the struct tool.

from musion.struct import Struct

struct = Struct()

# Select one of the two ways for input
## 1. Process a single file, given its file path
struct_res = struct(audio_path='dir/audio.wav')
## audio_path could also be a directory that contains audio files, or a list of audio paths.
struct_res = struct(audio_path='dir/')
struct_res = struct(audio_path=['audio1.wav', 'audio2.wav'])

## 2. Process a single audio data, given its pcm
from musion import MusionPCM
pcm = MusionPCM(samples, sample_rate)
struct_res = struct(pcm=pcm)

""" Optional Parameters """
# Save the result to a file
from musion import SaveConfig
save_cfg = SaveConfig(dir_path='dir/to/save/in', keys=['struct'])
# Where the keys can be obtained by
struct.result_keys
# Save the result by passing save_cfg, to the file: dir/to/save/in/audio.strcut
struct(audio_path='dir/audio.wav', save_cfg=save_cfg)

# Enable parallel processing when input contains multiple files, just set a proper number for num_threads
struct(audio_path='dir/', num_threads=5)

Command-Line Interface

Almost the same parameters as above. Type '$ musion -h' for more details. Here's a comprehensive example.

$ musion separate test_wavs/ --save_dir results_dir/ --save_keys vocals.wav bass.wav --num_threads 5

Contributing

If you would like to participate in the development of Musion you are more than welcome to do so. Don't hesitate to throw us a pull request and we'll do our best to examine it quickly.

musion's People

Contributors

zhaotw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.