Skip to main content

Omniscient Mozart, being able to transcribe everything in the music.

Project description

omnizart

build docs PyPI version PyPI - License PyPI - Downloads

Omniscient Mozart, being able to transcribe everything in the music, including vocal, drum, chord, beat, instruments, and more. Combines all the hard works developed by everyone in MCTLab into a single command line tool, and plan to distribute as a python package in the future.

A quick-start example is as following:

# Install omnizart
pip install omnizart

# Download the checkpoints after installation
omnizart download-checkpoints

# Now it's ready for the transcription~
omnizart drum transcribe <path/to/audio.wav>
omnizart chord transcribe <path/to/audio.wav>
omnizart music transcribe <path/to/audio.wav>

Comprehensive usage and API references can be found in the official documentation site.

About

Music and Culture Technology Lab (MCTLab) aims to develop technology for music and relevant applications by leveraging cutting-edge AI techiniques.

Plan to support

Commands transcribe train evaluate Description
music :heavy_check_mark: :heavy_check_mark: Transcribes notes of instruments.
drum :heavy_check_mark: :interrobang: Transcribes drum tracks.
vocal Transcribes pitch of vocal.
chord :heavy_check_mark: :heavy_check_mark: Transcribes chord progression.
beat Transcribes beat position.

NOTES Though the implementation of training the drum model is 90% complete, but there still exists some invisible bugs that cause the training fails to converge compared to the author's original implementation.

Example usage

omnizart music transcribe path/to/audio
omnizart chord transcribe path/to/audio
omnizart drum transcribe path/to/audio

For training a new model, download the dataset first and follow steps described below.

# The following command will default saving the extracted feature under the same folder,
# called train_feature and test_feature
omnizart music generate-featuer -d path/to/dataset

# Train a new model
omnizart music train-model -d path/to/dataset/train_feature --model-name My-Model

Development

Describes the neccessary background of how to develop this project.

Download and install

git clone https://github.com/Music-and-Culture-Technology-Lab/omnizart.git

# Install dependenies. For more different installation approaches, please refer to the official documentation page.
# The following command will download the checkpoints automatically.
cd omnizart
make install

# For developers, you have to install Dev dependencies as well, since they will not be installed by default.
poetry install

Package management

Uses poetry for package management, instead of writing requirements.txt and setup.py manually. We still provide the above two files for convenience. You can also generate them by executing make export.

Documentation

Automatically generate documents from inline docstrings of module, class, and function. Hosted document page

Documentation style: Follows numpy document flavor. Learn more from numpydoc.

Document builder: sphinx

To generate documents, cd docs/ and execute make html. To see the rendered results, run make serve and view from the browser. All documents and docstrings use reStructured Text format. More informations about this format can be found from Sphinx's Document.

Linters

Uses flake8 and pylint for coding style check.

To check with linters, execute make check.

You don't have to achieve a perfect score on pylint check, just pass 9.5 points still counted as a successful check.

Caution!

There is convenient make command for formating the code, but it should be used very carefully. Not only it could format the code for you, but also could mess up the code, and eventually you should still need to check the format manually after refacorting the code with tools.

To format the code with black and yapf, enter make format.

Unittest

Uses pytest for unittesting. Under construction...

CI/CD

Uses github actions for automatic linting, unittesting, document building, and package release. Currently supports two workflows:

  • General check
  • Documentation page publishing

General Check

Everytime you push to the master branch, file a pull request, and merge into master branch, will trigger this action. This will do checks like code format, and unittests by leveraging the above mentioned tools. If the check fails, you will not be able to merge the feature branch into master branch.

Documentation Page Publishing

We use github page to host our documentation, and is separated as an independent repository.

Please do not directly modify the content of the omnizart-doc repository!!

The only permitted way to update the documentation page is by updating the build_doc branch, and let the workflow do the rest of things.

Steps to update the documentation page:

  • Clone this repo
  • Create a new branch. DO NOT UPDATE THE build_doc BRANCH DIRECTLY!!
  • File a pull request
  • Merge into master (by admin)
  • Merge into build_doc branch (by admin)
  • Push to this repo (by admin)

Docker

Pack everything into a docker file. Under construction...

Command Test

To actually install and test the omnizart command, execute make install. This will automatically create a virtual environment and install everything needed inside it. After installation, just follow the instruction showing on the screen to activate the environment, then type omnizart --help to check if it works. After testing the command, type deactivate to leave the virtual environment.

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

omnizart-0.1.0.dev4.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

omnizart-0.1.0.dev4-py3-none-any.whl (3.5 MB view details)

Uploaded Python 3

File details

Details for the file omnizart-0.1.0.dev4.tar.gz.

File metadata

  • Download URL: omnizart-0.1.0.dev4.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure

File hashes

Hashes for omnizart-0.1.0.dev4.tar.gz
Algorithm Hash digest
SHA256 7e51b0ca7fc90b03c9b66bb6f52093725ff01008b45ff789f3042f2c33cdd699
MD5 93a5c2996dea282bc8c1230d61a8283c
BLAKE2b-256 491ba2167456de74d2b28f6b9cf1fbc77521ce868d90ff99b753be149e187fed

See more details on using hashes here.

File details

Details for the file omnizart-0.1.0.dev4-py3-none-any.whl.

File metadata

  • Download URL: omnizart-0.1.0.dev4-py3-none-any.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-1031-azure

File hashes

Hashes for omnizart-0.1.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 550f78cfbb55ac56506b3b71593052b8a6eac0ce2733139d29dde186c608173b
MD5 e6204151b7cc053585c548feb8fac24b
BLAKE2b-256 65450b26683b44fe59858741f34c6df205d00511adc6a9af306570be822fdd50

See more details on using hashes here.

Supported by

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