A lightweight yet powerful audio-to-MIDI converter with pitch bend detection
Python audiolightweightmachine-learningmidimusicpitch-detectionpolyphonicpythontranscriptiontypescript
debug
David Rubinsteinfde6787166b9
diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.ymlindex 11da2d8..a28a029 100644--- a/.github/workflows/tox.yml+++ b/.github/workflows/tox.yml@@ -13,7 +13,7 @@ jobs:os:- ubuntu-latest- windows-latest- - macos-13+ - macos-latestpy:- "3.11"- "3.10"diff --git a/basic_pitch/inference.py b/basic_pitch/inference.pyindex 85e2f4e..e97da12 100644--- a/basic_pitch/inference.py+++ b/basic_pitch/inference.py@@ -153,7 +153,10 @@ class Model:if self.model_type == Model.MODEL_TYPES.TENSORFLOW:return {k: v.numpy() for k, v in cast(tf.keras.Model, self.model(x)).items()}elif self.model_type == Model.MODEL_TYPES.COREML:- return cast(ct.models.MLModel, self.model.predict({"input": x})) # type: ignore+ print(f"isfinite: {np.all(np.isfinite(x))}", flush=True)+ print(f"shape: {x.shape}", flush=True)+ print(f"dtype: {x.dtype}", flush=True)+ return cast(ct.models.MLModel, self.model).predict({"input": x}) # type: ignoreelif self.model_type == Model.MODEL_TYPES.TFLITE:return self.model(input_2=x) # type: ignoreelif self.model_type == Model.MODEL_TYPES.ONNX:diff --git a/tox.ini b/tox.iniindex 7f31407..5568774 100644--- a/tox.ini+++ b/tox.ini@@ -11,7 +11,7 @@ requires =[testenv]deps = -e .[test]commands =- pytest tests --ignore tests/test_nn.py {posargs}+ pytest tests --ignore tests/test_nn.py -s {posargs}setenv =SOURCE = {toxinidir}/basic_pitchTEST_SOURCE = {toxinidir}/tests