Skip to content

Commit

Permalink
Merge pull request #123 from spotify/predict-fix
Browse files Browse the repository at this point in the history
Default predict() to the default model path from __init__.py.
  • Loading branch information
drubinstein committed Apr 22, 2024
2 parents 3505516 + 8f2894b commit 241c4ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions basic_pitch/inference.py
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion 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 = []
Expand Down

0 comments on commit 241c4ce

Please sign in to comment.