You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I'm experiencing an issue where the MIDI output generated by the basic_pitch library on my local machine has a lot of off notes. However, when I use the demo website, the notes seem to be correct. This appears to be similar to the issue discussed in #[126], but I'm still encountering the problem.
Environment:
OS: Windows 10
Python version: 3.11
Basic Pitch version: latest
TensorFlow version: latest
Steps to Reproduce:
Install the required packages:
pip install basic_pitch[tf]
Use the following script to convert an audio file to MIDI:
importosfrombasic_pitch.inferenceimportpredict_and_savefrombasic_pitchimportICASSP_2022_MODEL_PATHdefconvert_to_midi(audio_file, output_directory):
print(audio_file)
# Verify the file existsifnotos.path.exists(audio_file):
raiseFileNotFoundError(f"File not found: {audio_file}")
try:
predict_and_save(
audio_path_list=[audio_file], # <input-audio-path-list>output_directory=output_directory, # <output-directory>save_midi=True, # <save-midi>sonify_midi=False, # <sonify-midi>save_model_outputs=True, # <save-model-outputs>save_notes=True, # <save-notes>model_or_model_path=ICASSP_2022_MODEL_PATH,
minimum_note_length=11,
maximum_frequency=3000.0, # Maximum Pitch
)
exceptExceptionase:
print(f"Error reading or converting audio file: {e}")
raiseoutput_dir='output'convert_to_midi("E:/Data/pycharm_projects/azimuth-melody-extraction-v2/output_directory/test-audio.wav", output_dir)
print(f"MIDI file is saved at {output_dir}")
Compare the MIDI output generated by the script with the output generated by the demo website.
Expected behavior:
The MIDI output generated by the script should have the correct notes, similar to the output generated by the demo website.
Actual behavior:
The MIDI output generated by the script has a lot of off notes.
Additional context:
I have verified that the audio file used for testing is the same in both cases.
The model path used in the script is ICASSP_2022_MODEL_PATH.
This issue seems related to #[126] which is now closed, but the problem persists.
Would be great if anyone can tell me how to get the exact output that is produced by the demo website: basic pitch demo
The text was updated successfully, but these errors were encountered:
I believe the python version is causing is. I tried with 3.10 and the notes do overlap with what is being produced by the demo site, although the pitch velocities are definitely different
Are you ensuring that all the parameters on the website match what you are using locally
When you say TF latest, which version do you actually mean? Basic-Pitch installs tf<2.16, i.e. less than latest
If you have an audio file you could share that'd also be great. It looks like the velocities in basic-pitch and basic-pitch-ts could be slightly different.
Description:
I'm experiencing an issue where the MIDI output generated by the
basic_pitch
library on my local machine has a lot of off notes. However, when I use the demo website, the notes seem to be correct. This appears to be similar to the issue discussed in #[126], but I'm still encountering the problem.Environment:
Steps to Reproduce:
Install the required packages:
Use the following script to convert an audio file to MIDI:
Compare the MIDI output generated by the script with the output generated by the demo website.
Expected behavior:
The MIDI output generated by the script should have the correct notes, similar to the output generated by the demo website.
Actual behavior:
The MIDI output generated by the script has a lot of off notes.
Additional context:
ICASSP_2022_MODEL_PATH
.Would be great if anyone can tell me how to get the exact output that is produced by the demo website: basic pitch demo
The text was updated successfully, but these errors were encountered: