analyzeAudio 0.0.17__tar.gz → 0.0.18__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/PKG-INFO +7 -15
  2. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/README.md +1 -10
  3. analyzeaudio-0.0.18/analyzeAudio/__init__.py +14 -0
  4. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio/analyzersUseFilename.py +1 -1
  5. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio/audioAspectsRegistry.py +4 -5
  6. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio/pythonator.py +2 -2
  7. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio.egg-info/PKG-INFO +7 -15
  8. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio.egg-info/requires.txt +3 -1
  9. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio.egg-info/top_level.txt +1 -0
  10. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/pyproject.toml +9 -8
  11. analyzeaudio-0.0.17/analyzeAudio/__init__.py +0 -14
  12. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/LICENSE +0 -0
  13. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio/analyzersUseSpectrogram.py +0 -0
  14. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio/analyzersUseTensor.py +0 -0
  15. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio/analyzersUseWaveform.py +0 -0
  16. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio/py.typed +0 -0
  17. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio.egg-info/SOURCES.txt +0 -0
  18. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio.egg-info/dependency_links.txt +0 -0
  19. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/analyzeAudio.egg-info/entry_points.txt +0 -0
  20. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/setup.cfg +0 -0
  21. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/tests/conftest.py +0 -0
  22. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/tests/test_audioAspectsRegistry.py +0 -0
  23. {analyzeaudio-0.0.17 → analyzeaudio-0.0.18}/tests/test_other.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: analyzeAudio
3
- Version: 0.0.17
3
+ Version: 0.0.18
4
4
  Summary: Measure one or more aspects of one or more audio files.
5
5
  Author-email: Hunter Hogan <HunterHogan@pm.me>
6
6
  License: CC-BY-NC-4.0
7
7
  Project-URL: Donate, https://www.patreon.com/integrated
8
8
  Project-URL: Homepage, https://github.com/hunterhogan/analyzeAudio
9
- Project-URL: Issues, https://github.com/hunterhogan/
9
+ Project-URL: Issues, https://github.com/hunterhogan/analyzeAudio/issues
10
10
  Project-URL: Repository, https://github.com/hunterhogan/analyzeAudio.git
11
11
  Keywords: FFmpeg,FFprobe,LUFS,RMS,SRMR,analysis,audio,audio-analysis,loudness,measurement,metrics,signal-processing,spectral,spectrum,torch,waveform
12
12
  Classifier: Development Status :: 3 - Alpha
@@ -20,17 +20,17 @@ Classifier: Natural Language :: English
20
20
  Classifier: Operating System :: OS Independent
21
21
  Classifier: Programming Language :: Python
22
22
  Classifier: Programming Language :: Python :: 3
23
- Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
27
  Classifier: Topic :: Multimedia :: Sound/Audio
28
28
  Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
29
29
  Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
30
30
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
31
31
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
32
32
  Classifier: Typing :: Typed
33
- Requires-Python: >=3.10
33
+ Requires-Python: >=3.11
34
34
  Description-Content-Type: text/markdown
35
35
  License-File: LICENSE
36
36
  Requires-Dist: Z0Z_tools
@@ -44,11 +44,12 @@ Requires-Dist: torch
44
44
  Requires-Dist: torchmetrics[audio]
45
45
  Requires-Dist: tqdm
46
46
  Requires-Dist: typing_extensions
47
+ Provides-Extra: development
48
+ Requires-Dist: setuptools-scm; extra == "development"
47
49
  Provides-Extra: testing
48
50
  Requires-Dist: pytest; extra == "testing"
49
51
  Requires-Dist: pytest-cov; extra == "testing"
50
52
  Requires-Dist: pytest-xdist; extra == "testing"
51
- Requires-Dist: pyupgrade; extra == "testing"
52
53
  Dynamic: license-file
53
54
 
54
55
  # analyzeAudio
@@ -215,13 +216,4 @@ pip install analyzeAudio
215
216
  [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
216
217
  [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
217
218
 
218
- ## How to code
219
-
220
- Coding One Step at a Time:
221
-
222
- 0. WRITE CODE.
223
- 1. Don't write stupid code that's hard to revise.
224
- 2. Write good code.
225
- 3. When revising, write better code.
226
-
227
- [![CC-BY-NC-4.0](https://github.com/hunterhogan/analyzeAudio/blob/main/CC-BY-NC-4.0.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
219
+ [![CC-BY-NC-4.0](https://raw.githubusercontent.com/hunterhogan/analyzeAudio/refs/heads/main/.github/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
@@ -162,13 +162,4 @@ pip install analyzeAudio
162
162
  [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
163
163
  [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
164
164
 
165
- ## How to code
166
-
167
- Coding One Step at a Time:
168
-
169
- 0. WRITE CODE.
170
- 1. Don't write stupid code that's hard to revise.
171
- 2. Write good code.
172
- 3. When revising, write better code.
173
-
174
- [![CC-BY-NC-4.0](https://github.com/hunterhogan/analyzeAudio/blob/main/CC-BY-NC-4.0.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
165
+ [![CC-BY-NC-4.0](https://raw.githubusercontent.com/hunterhogan/analyzeAudio/refs/heads/main/.github/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
@@ -0,0 +1,14 @@
1
+ """Docstring?! Ain't nobody got time for that!."""
2
+ from .audioAspectsRegistry import (
3
+ analyzeAudioFile, analyzeAudioListPathFilenames, audioAspects, cacheAudioAnalyzers, getListAvailableAudioAspects,
4
+ registrationAudioAspect)
5
+
6
+ __all__ = [
7
+ 'analyzeAudioFile',
8
+ 'analyzeAudioListPathFilenames',
9
+ 'audioAspects',
10
+ 'getListAvailableAudioAspects',
11
+ ]
12
+
13
+ # isort: split
14
+ from . import analyzersUseFilename, analyzersUseSpectrogram, analyzersUseTensor, analyzersUseWaveform
@@ -37,7 +37,7 @@ def getSI_SDRmean(pathFilenameAlpha: str | PathLike[Any], pathFilenameBeta: str
37
37
  """
38
38
  commandLineFFmpeg = [
39
39
  'ffmpeg', '-hide_banner', '-loglevel', '32',
40
- '-i', f'{str(pathlib.Path(pathFilenameAlpha))}', '-i', f'{str(pathlib.Path(pathFilenameBeta))}', # noqa: RUF010
40
+ '-i', f'{str(pathlib.Path(pathFilenameAlpha))}', '-i', f'{str(pathlib.Path(pathFilenameBeta))}',
41
41
  '-filter_complex', '[0][1]asisdr', '-f', 'null', '-'
42
42
  ]
43
43
  systemProcessFFmpeg = subprocess.run(commandLineFFmpeg, check=True, stderr=subprocess.PIPE)
@@ -1,6 +1,6 @@
1
1
  from collections.abc import Callable, Sequence # noqa: D100
2
2
  from concurrent.futures import as_completed, ProcessPoolExecutor
3
- from hunterMakesPy import defineConcurrencyLimit, oopsieKwargsie
3
+ from hunterMakesPy.parseParameters import defineConcurrencyLimit, oopsieKwargsie
4
4
  from multiprocessing import set_start_method as multiprocessing_set_start_method
5
5
  from numpy.typing import NDArray
6
6
  from os import PathLike
@@ -30,7 +30,6 @@ class analyzersAudioAspects(TypedDict): # noqa: D101
30
30
  analyzer: Callable[..., Any]
31
31
  analyzerParameters: list[str]
32
32
 
33
-
34
33
  audioAspects: dict[audioAspect, analyzersAudioAspects] = {}
35
34
  """A register of 1) measurable aspects of audio data, 2) analyzer functions to measure audio aspects, 3) and parameters of analyzer functions."""
36
35
 
@@ -75,7 +74,7 @@ def registrationAudioAspect(aspectName: str) -> Callable[[Callable[parameterSpec
75
74
 
76
75
  """
77
76
  aspectValue = registrant(*arguments, **keywordArguments)
78
- return numpy.mean(cast('NDArray[Any]', aspectValue))
77
+ return numpy.mean(cast(NDArray[Any], aspectValue))
79
78
  # return aspectValue.mean()
80
79
  audioAspects[f"{aspectName} mean"] = {
81
80
  'analyzer': registrationAudioAspectMean,
@@ -117,7 +116,7 @@ def analyzeAudioFile(pathFilename: str | PathLike[Any], listAspectNames: list[st
117
116
  try:
118
117
  tensorAudio = torch.from_numpy(waveform) # pyright: ignore[reportUnknownMemberType] # memory-sharing # noqa: F841
119
118
  tryAgain = False
120
- except RuntimeError as ERRORmessage: # noqa: PERF203
119
+ except RuntimeError as ERRORmessage:
121
120
  if 'negative stride' in str(ERRORmessage):
122
121
  waveform = waveform.copy() # not memory-sharing
123
122
  tryAgain = True
@@ -138,7 +137,7 @@ def analyzeAudioFile(pathFilename: str | PathLike[Any], listAspectNames: list[st
138
137
 
139
138
  return [dictionaryAspectsAnalyzed[aspectName] for aspectName in listAspectNames]
140
139
 
141
- def analyzeAudioListPathFilenames(listPathFilenames: Sequence[str] | Sequence[PathLike[Any]], listAspectNames: list[str], CPUlimit: int | float | bool | None = None) -> list[list[str | float | NDArray[Any]]]: # noqa: FBT001, PYI041
140
+ def analyzeAudioListPathFilenames(listPathFilenames: Sequence[str] | Sequence[PathLike[Any]], listAspectNames: list[str], CPUlimit: int | float | bool | None = None) -> list[list[str | float | NDArray[Any]]]: # noqa: FBT001
142
141
  """
143
142
  Analyzes a list of audio files for specified aspects of the individual files and returns the results.
144
143
 
@@ -17,7 +17,7 @@ class Blackdetect(NamedTuple): # noqa: D101
17
17
  black_start: float | None = None
18
18
  black_end: float | None = None
19
19
 
20
- def pythonizeFFprobe(FFprobeJSON_utf8: str) -> tuple[defaultdict[str, Any] | dict[str, Any], dict[str, numpy.ndarray[Any, Any] | dict[str, numpy.ndarray[Any, Any]]]]: # noqa: C901, PLR0912, PLR0915
20
+ def pythonizeFFprobe(FFprobeJSON_utf8: str) -> tuple[defaultdict[str, Any] | dict[str, Any], dict[str, numpy.ndarray[Any, Any] | dict[str, numpy.ndarray[Any, Any]]]]:
21
21
  FFroot: dict[str, Any] = json.loads(FFprobeJSON_utf8)
22
22
  Z0Z_dictionaries: dict[str, numpy.ndarray[Any, Any] | dict[str, numpy.ndarray[Any, Any]]] = {}
23
23
  if 'packets_and_frames' in FFroot: # Divide into 'packets' and 'frames'
@@ -92,7 +92,7 @@ def pythonizeFFprobe(FFprobeJSON_utf8: str) -> tuple[defaultdict[str, Any] | dic
92
92
  Z0Z_dictionaries[registrant] = {}
93
93
  elif statistic not in Z0Z_dictionaries[registrant]:
94
94
  # NOTE (as of this writing) `registrar` can only understand the generic class `numpy.ndarray` and not more specific typing # noqa: ERA001
95
- valueSherpa = cast('numpy.ndarray', numpy.zeros((channel, len(FFroot['frames'])))) # pyright: ignore[reportMissingTypeArgument, reportUnknownVariableType]
95
+ valueSherpa = cast(numpy.ndarray, numpy.zeros((channel, len(FFroot['frames'])))) # pyright: ignore[reportMissingTypeArgument, reportUnknownVariableType]
96
96
  Z0Z_dictionaries[registrant][statistic] = valueSherpa
97
97
  else:
98
98
  raise # Re-raise the exception
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: analyzeAudio
3
- Version: 0.0.17
3
+ Version: 0.0.18
4
4
  Summary: Measure one or more aspects of one or more audio files.
5
5
  Author-email: Hunter Hogan <HunterHogan@pm.me>
6
6
  License: CC-BY-NC-4.0
7
7
  Project-URL: Donate, https://www.patreon.com/integrated
8
8
  Project-URL: Homepage, https://github.com/hunterhogan/analyzeAudio
9
- Project-URL: Issues, https://github.com/hunterhogan/
9
+ Project-URL: Issues, https://github.com/hunterhogan/analyzeAudio/issues
10
10
  Project-URL: Repository, https://github.com/hunterhogan/analyzeAudio.git
11
11
  Keywords: FFmpeg,FFprobe,LUFS,RMS,SRMR,analysis,audio,audio-analysis,loudness,measurement,metrics,signal-processing,spectral,spectrum,torch,waveform
12
12
  Classifier: Development Status :: 3 - Alpha
@@ -20,17 +20,17 @@ Classifier: Natural Language :: English
20
20
  Classifier: Operating System :: OS Independent
21
21
  Classifier: Programming Language :: Python
22
22
  Classifier: Programming Language :: Python :: 3
23
- Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
27
  Classifier: Topic :: Multimedia :: Sound/Audio
28
28
  Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
29
29
  Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
30
30
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
31
31
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
32
32
  Classifier: Typing :: Typed
33
- Requires-Python: >=3.10
33
+ Requires-Python: >=3.11
34
34
  Description-Content-Type: text/markdown
35
35
  License-File: LICENSE
36
36
  Requires-Dist: Z0Z_tools
@@ -44,11 +44,12 @@ Requires-Dist: torch
44
44
  Requires-Dist: torchmetrics[audio]
45
45
  Requires-Dist: tqdm
46
46
  Requires-Dist: typing_extensions
47
+ Provides-Extra: development
48
+ Requires-Dist: setuptools-scm; extra == "development"
47
49
  Provides-Extra: testing
48
50
  Requires-Dist: pytest; extra == "testing"
49
51
  Requires-Dist: pytest-cov; extra == "testing"
50
52
  Requires-Dist: pytest-xdist; extra == "testing"
51
- Requires-Dist: pyupgrade; extra == "testing"
52
53
  Dynamic: license-file
53
54
 
54
55
  # analyzeAudio
@@ -215,13 +216,4 @@ pip install analyzeAudio
215
216
  [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
216
217
  [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
217
218
 
218
- ## How to code
219
-
220
- Coding One Step at a Time:
221
-
222
- 0. WRITE CODE.
223
- 1. Don't write stupid code that's hard to revise.
224
- 2. Write good code.
225
- 3. When revising, write better code.
226
-
227
- [![CC-BY-NC-4.0](https://github.com/hunterhogan/analyzeAudio/blob/main/CC-BY-NC-4.0.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
219
+ [![CC-BY-NC-4.0](https://raw.githubusercontent.com/hunterhogan/analyzeAudio/refs/heads/main/.github/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
@@ -12,8 +12,10 @@ typing_extensions
12
12
  standard-aifc
13
13
  standard-sunau
14
14
 
15
+ [development]
16
+ setuptools-scm
17
+
15
18
  [testing]
16
19
  pytest
17
20
  pytest-cov
18
21
  pytest-xdist
19
- pyupgrade
@@ -1,4 +1,5 @@
1
1
  analyzeAudio
2
2
  citations
3
3
  dist
4
+ notesPythonator
4
5
  tests
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "analyzeAudio"
3
- version = "0.0.17"
3
+ version = "0.0.18"
4
4
  description = "Measure one or more aspects of one or more audio files."
5
5
  readme = { file = "README.md", content-type = "text/markdown" }
6
- requires-python = ">=3.10"
6
+ requires-python = ">=3.11"
7
7
  license = { 'text' = "CC-BY-NC-4.0" }
8
8
  authors = [{ name = "Hunter Hogan", email = "HunterHogan@pm.me" }]
9
9
  keywords = [
@@ -36,10 +36,10 @@ classifiers = [
36
36
  "Operating System :: OS Independent",
37
37
  "Programming Language :: Python",
38
38
  "Programming Language :: Python :: 3",
39
- "Programming Language :: Python :: 3.10",
40
39
  "Programming Language :: Python :: 3.11",
41
40
  "Programming Language :: Python :: 3.12",
42
41
  "Programming Language :: Python :: 3.13",
42
+ "Programming Language :: Python :: 3.14",
43
43
  "Topic :: Multimedia :: Sound/Audio",
44
44
  "Topic :: Multimedia :: Sound/Audio :: Analysis",
45
45
  "Topic :: Multimedia :: Sound/Audio :: Conversion",
@@ -47,7 +47,7 @@ classifiers = [
47
47
  "Topic :: Software Development :: Libraries :: Python Modules",
48
48
  "Typing :: Typed",
49
49
  ]
50
- urls = { Donate = "https://www.patreon.com/integrated", Homepage = "https://github.com/hunterhogan/analyzeAudio", Issues = "https://github.com/hunterhogan/", Repository = "https://github.com/hunterhogan/analyzeAudio.git" }
50
+ urls = { Donate = "https://www.patreon.com/integrated", Homepage = "https://github.com/hunterhogan/analyzeAudio", Issues = "https://github.com/hunterhogan/analyzeAudio/issues", Repository = "https://github.com/hunterhogan/analyzeAudio.git" }
51
51
  dependencies = [
52
52
  "Z0Z_tools",
53
53
  "cachetools",
@@ -61,11 +61,12 @@ dependencies = [
61
61
  "tqdm",
62
62
  "typing_extensions",
63
63
  ]
64
- optional-dependencies = { testing = [
64
+ optional-dependencies = { development = [
65
+ "setuptools-scm",
66
+ ], testing = [
65
67
  "pytest",
66
68
  "pytest-cov",
67
69
  "pytest-xdist",
68
- "pyupgrade",
69
70
  ] }
70
71
 
71
72
  [project.scripts]
@@ -89,9 +90,9 @@ run = { branch = true, concurrency = [
89
90
  ] }
90
91
  xml = { output = "tests/coverage/coverage.xml" }
91
92
 
92
- [tool.pytest.ini_options]
93
+ [tool.pytest]
93
94
  addopts = ["--color=auto", "-n 4"]
94
- log_auto_indent = true
95
+ log_auto_indent = "On"
95
96
  testpaths = ["tests"]
96
97
 
97
98
  [tool.setuptools]
@@ -1,14 +0,0 @@
1
- from .audioAspectsRegistry import registrationAudioAspect, cacheAudioAnalyzers, analyzeAudioFile, \
2
- analyzeAudioListPathFilenames, getListAvailableAudioAspects, audioAspects
3
-
4
- __all__ = [
5
- 'analyzeAudioFile',
6
- 'analyzeAudioListPathFilenames',
7
- 'audioAspects',
8
- 'getListAvailableAudioAspects',
9
- ]
10
-
11
- from . import analyzersUseFilename
12
- from . import analyzersUseSpectrogram
13
- from . import analyzersUseTensor
14
- from . import analyzersUseWaveform
File without changes
File without changes