Skip to main content

Audio To Midi

Project description

from audio2midi.librosa_pitch_detector import Normal_Pitch_Det , Guitar_Pitch_Det

audio_path = "audio.mp3"
Normal_Pitch_Det().predict(audio_path)
Guitar_Pitch_Det().predict(audio_path)

from os import environ
from huggingface_hub import hf_hub_download
from shutil import unpack_archive
from pathlib import Path
from audio2midi.melodia_pitch_detector import Melodia
from platform import system as platform_system , architecture as platform_architecture

unpack_archive(hf_hub_download("shethjenil/Audio2Midi_Models",f"melodia_vamp_plugin_{'win' if (system := platform_system()) == 'Windows' else 'mac' if system == 'Darwin' else 'linux64' if (arch := platform_architecture()[0]) == '64bit' else 'linux32' if arch == '32bit' else None}.zip"),"vamp_melodia",format="zip")
environ['VAMP_PATH'] = str(Path("vamp_melodia").absolute())
Melodia().predict(audio_path)

from audio2midi.basic_pitch_pitch_detector import BasicPitch
from audio2midi.crepe_pitch_detector import Crepe
from audio2midi.violin_pitch_detector import Violin_Pitch_Det
from audio2midi.pop2piano import Pop2Piano
from torch import device as Device
from torch.cuda import is_available as cuda_is_available
device = Device("cuda" if cuda_is_available() else "cpu")
Crepe().predict(audio_path)
Pop2Piano(device=device).predict(audio_path)
Violin_Pitch_Det(device=device).predict(audio_path)
BasicPitch(device=device).predict(audio_path)

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

audio2midi-0.3.0.tar.gz (54.1 kB view details)

Uploaded Source

Built Distribution

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

audio2midi-0.3.0-py2.py3-none-any.whl (57.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file audio2midi-0.3.0.tar.gz.

File metadata

  • Download URL: audio2midi-0.3.0.tar.gz
  • Upload date:
  • Size: 54.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.17

File hashes

Hashes for audio2midi-0.3.0.tar.gz
Algorithm Hash digest
SHA256 af9d9f612255203cda0bf56e29bb0d4b53baffbc96562f140eaa5901471714f9
MD5 9a50bf1ff536cc0a1d1dc399d29b5cf6
BLAKE2b-256 20032961eb14cece3b40197a66658cbc7ec154145a469ee64f0198713df7bc6c

See more details on using hashes here.

File details

Details for the file audio2midi-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for audio2midi-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed4ea2b61a5088230cbecf085a41af13f061fb3f56da23a378241e4bfac9b8ec
MD5 5b181d294099020678afbfe3caadb47e
BLAKE2b-256 47cc403841016397255b81a525ed21cf5c8bc24ffd038114d7c66c90b0274bb9

See more details on using hashes here.

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