Skip to content

Commit 88adef5

Browse files
committed
Update python versions
1 parent fa5997a commit 88adef5

8 files changed

Lines changed: 15 additions & 15 deletions

File tree

.github/workflows/tox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
- ubuntu-latest
1515
- windows-latest
1616
py:
17+
- "3.13"
18+
- "3.12"
1719
- "3.11"
1820
- "3.10"
19-
- "3.9"
20-
- "3.8"
2121
include:
2222
- os: macos-latest-xlarge
2323
py: "3.10.11"

basic_pitch/inference.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
AUDIO_N_SAMPLES,
5858
ANNOTATIONS_FPS,
5959
FFT_HOP,
60-
AUDIO_WINDOW_LENGTH,
60+
AUDIO_WINDOW_LENGTH
6161
)
6262
from basic_pitch.commandline_printing import (
6363
generating_file_message,
@@ -248,7 +248,7 @@ def unwrap_output(
248248
output: npt.NDArray[np.float32],
249249
audio_original_length: int,
250250
n_overlapping_frames: int,
251-
hop_size: int,
251+
hop_size: int
252252
) -> np.array:
253253
"""Unwrap batched model predictions to a single matrix.
254254
@@ -271,8 +271,9 @@ def unwrap_output(
271271

272272
# Concatenate the frames outputs (overlapping frames removed) into a single dimension
273273
output_shape = output.shape
274+
n_output_frames_original = int(np.floor(audio_original_length * (ANNOTATIONS_FPS / AUDIO_SAMPLE_RATE)))
274275
unwrapped_output = output.reshape(output_shape[0] * output_shape[1], output_shape[2])
275-
276+
276277
# trim to number of expected windows in output
277278
n_expected_windows = audio_original_length / hop_size
278279
n_frames_per_window = (AUDIO_WINDOW_LENGTH * ANNOTATIONS_FPS) - n_overlapping_frames
@@ -310,8 +311,7 @@ def run_inference(
310311
output[k].append(v)
311312

312313
unwrapped_output = {
313-
k: unwrap_output(np.concatenate(output[k]), audio_original_length, n_overlapping_frames, hop_size)
314-
for k in output
314+
k: unwrap_output(np.concatenate(output[k]), audio_original_length, n_overlapping_frames, hop_size) for k in output
315315
}
316316

317317
if debug_file:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
���ٮ�‹X��������K��������$ ��ɠ����(���������2
-794 KB
Binary file not shown.
Binary file not shown.
-3.27 KB
Binary file not shown.

pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "basic-pitch"
33
version = "0.4.0"
44
description = "Basic Pitch, a lightweight yet powerful audio-to-MIDI converter with pitch bend detection."
55
readme = "README.md"
6+
requires-python = ">=3.10"
67
keywords = []
78
classifiers = [
89
"Development Status :: 5 - Production/Stable",
@@ -11,10 +12,10 @@ classifiers = [
1112
"Operating System :: MacOS :: MacOS X",
1213
"Operating System :: Microsoft :: Windows",
1314
"Programming Language :: Python",
14-
"Programming Language :: Python :: 3.8",
15-
"Programming Language :: Python :: 3.9",
1615
"Programming Language :: Python :: 3.10",
1716
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: Python :: 3.13",
1819
"Programming Language :: Python :: Implementation :: CPython",
1920
]
2021
dependencies = [
@@ -27,8 +28,7 @@ dependencies = [
2728
"resampy>=0.2.2,<0.4.3",
2829
"scikit-learn",
2930
"scipy>=1.4.1",
30-
"tensorflow>=2.4.1,<2.15.1; platform_system != 'Darwin' and python_version >= '3.11'",
31-
"tensorflow-macos>=2.4.1,<2.15.1; platform_system == 'Darwin' and python_version > '3.11'",
31+
"tensorflow>=2.16.0;python_version >= '3.11'",
3232
"tflite-runtime; platform_system == 'Linux' and python_version < '3.11'",
3333
"typing_extensions",
3434
]
@@ -54,7 +54,7 @@ bp-download = "basic_pitch.data.download:main"
5454
[project.optional-dependencies]
5555
data = [
5656
"basic_pitch[tf,test]",
57-
"apache_beam",
57+
"apache-beam>=2.50.0",
5858
"mirdata>=1.0.0",
5959
"smart_open",
6060
"sox",
@@ -68,8 +68,7 @@ test = [
6868
"mido"
6969
]
7070
tf = [
71-
"tensorflow>=2.4.1,<2.15.1; platform_system != 'Darwin'",
72-
"tensorflow-macos>=2.4.1,<2.15.1; platform_system == 'Darwin' and python_version > '3.7'",
71+
"tensorflow>=2.16.1"
7372
]
7473
coreml = ["coremltools"]
7574
onnx = ["onnxruntime"]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py38,py39,py310,py311,full,data,manifest,check-formatting,lint,mypy
2+
envlist = py313,py312,py311,py310,full,data,manifest,check-formatting,lint,mypy
33
skipsdist = True
44
usedevelop = True
55
requires =

0 commit comments

Comments
 (0)