From 6ec8658f25daa761df5222a29728e1d5f5328d4e Mon Sep 17 00:00:00 2001 From: David Rubinstein Date: Fri, 19 Apr 2024 19:52:41 -0400 Subject: [PATCH 1/2] Default predict() to the default model path from __init__.py. --- basic_pitch/inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basic_pitch/inference.py b/basic_pitch/inference.py index 7d79cf8..94b4ab9 100644 --- a/basic_pitch/inference.py +++ b/basic_pitch/inference.py @@ -24,7 +24,7 @@ from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union, cast -from basic_pitch import CT_PRESENT, ONNX_PRESENT, TF_PRESENT, TFLITE_PRESENT +from basic_pitch import CT_PRESENT, ICASSP_2022_MODEL_PATH, ONNX_PRESENT, TF_PRESENT, TFLITE_PRESENT try: import tensorflow as tf @@ -413,7 +413,7 @@ def save_note_events( def predict( audio_path: Union[pathlib.Path, str], - model_or_model_path: Union[Model, pathlib.Path, str], + model_or_model_path: Union[Model, pathlib.Path, str] = ICASSP_2022_MODEL_PATH, onset_threshold: float = 0.5, frame_threshold: float = 0.3, minimum_note_length: float = 127.70, From 8f2894b2710105387f895bf06f54f13cde8df630 Mon Sep 17 00:00:00 2001 From: David Rubinstein Date: Fri, 19 Apr 2024 19:52:58 -0400 Subject: [PATCH 2/2] bump patch version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index da7b323..1d47995 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "basic-pitch" -version = "0.3.1" +version = "0.3.2" description = "Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection." readme = "README.md" keywords = []