A lightweight yet powerful audio-to-MIDI converter with pitch bend detection
Python audiolightweightmachine-learningmidimusicpitch-detectionpolyphonicpythontranscriptiontypescript
Move from model-type to model-serialization
David Rubinstein3ce2617b2e94
diff --git a/README.md b/README.mdindex 6357ba8..5155e59 100644--- a/README.md+++ b/README.md@@ -94,7 +94,7 @@ Optionally, you may append any of the following flags to your prediction command- `--save-model-outputs` to additionally save raw model outputs as an NPZ file- `--save-note-events` to additionally save the predicted note events as a CSV file-If you want to use a non-default model type (e.g., use CoreML instead of TF), use the `--model-type` argument. The CLI will change the loaded model to the type you prefer.+If you want to use a non-default model type (e.g., use CoreML instead of TF), use the `--model-serialization` argument. The CLI will change the loaded model to the type you prefer.To discover more parameter control, run:```bashdiff --git a/basic_pitch/predict.py b/basic_pitch/predict.pyindex 725af8b..d4b40df 100644--- a/basic_pitch/predict.py+++ b/basic_pitch/predict.py@@ -50,7 +50,7 @@ def main() -> None:"[tensorflow, coreml, tensorflow-lite, onnx]",)parser.add_argument(- "--model-type",+ "--model-serialization",type=str,choices=["tf", "coreml", "tflite", "onnx"],help="If used, --model-path is ignored and instead the model serialization type" "specified is used.",@@ -159,8 +159,8 @@ def main() -> None:for audio_path in audio_path_list:verify_input_path(audio_path)- if args.model_type:- model = Model(build_icassp_2022_model_path(FilenameSuffix[args.model_type]))+ if args.model_serialization:+ model = Model(build_icassp_2022_model_path(FilenameSuffix[args.model_serialization]))else:model = Model(args.model_path)