analyzeAudio 0.0.13__tar.gz → 0.0.15__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 (22) hide show
  1. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/PKG-INFO +53 -18
  2. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/README.md +36 -14
  3. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio/analyzersUseFilename.py +17 -17
  4. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio/audioAspectsRegistry.py +9 -8
  5. analyzeaudio-0.0.15/analyzeAudio/py.typed +0 -0
  6. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio.egg-info/PKG-INFO +53 -18
  7. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio.egg-info/SOURCES.txt +1 -0
  8. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio.egg-info/requires.txt +5 -1
  9. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/pyproject.toml +21 -8
  10. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/LICENSE +0 -0
  11. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio/__init__.py +0 -0
  12. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio/analyzersUseSpectrogram.py +0 -0
  13. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio/analyzersUseTensor.py +0 -0
  14. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio/analyzersUseWaveform.py +0 -0
  15. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio/pythonator.py +0 -0
  16. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio.egg-info/dependency_links.txt +0 -0
  17. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio.egg-info/entry_points.txt +0 -0
  18. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/analyzeAudio.egg-info/top_level.txt +0 -0
  19. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/setup.cfg +0 -0
  20. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/tests/conftest.py +0 -0
  21. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/tests/test_audioAspectsRegistry.py +0 -0
  22. {analyzeaudio-0.0.13 → analyzeaudio-0.0.15}/tests/test_other.py +0 -0
@@ -1,23 +1,33 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: analyzeAudio
3
- Version: 0.0.13
3
+ Version: 0.0.15
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
9
  Project-URL: Repository, https://github.com/hunterhogan/analyzeAudio.git
10
- Keywords: audio,analysis,measurement,metrics,torch
10
+ Keywords: audio,analysis,measurement,metrics,torch,spectrum,spectral,waveform,loudness,LUFS,RMS,FFmpeg,FFprobe,SRMR,audio-analysis,signal-processing
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Intended Audience :: Information Technology
15
17
  Classifier: Intended Audience :: Other Audience
16
18
  Classifier: Natural Language :: English
17
19
  Classifier: Operating System :: OS Independent
18
20
  Classifier: Programming Language :: Python
19
21
  Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Topic :: Multimedia :: Sound/Audio
20
27
  Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
28
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
29
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
30
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
31
  Classifier: Typing :: Typed
22
32
  Requires-Python: >=3.10
23
33
  Description-Content-Type: text/markdown
@@ -26,15 +36,18 @@ Requires-Dist: cachetools
26
36
  Requires-Dist: librosa
27
37
  Requires-Dist: numpy
28
38
  Requires-Dist: optype[numpy]
39
+ Requires-Dist: standard-aifc; python_version >= "3.13"
40
+ Requires-Dist: standard-sunau; python_version >= "3.13"
29
41
  Requires-Dist: torch
30
42
  Requires-Dist: torchmetrics[audio]
31
43
  Requires-Dist: tqdm
32
44
  Requires-Dist: Z0Z_tools
33
45
  Provides-Extra: testing
46
+ Requires-Dist: pytest; extra == "testing"
34
47
  Requires-Dist: pytest-cov; extra == "testing"
35
48
  Requires-Dist: pytest-xdist; extra == "testing"
36
- Requires-Dist: pytest; extra == "testing"
37
49
  Requires-Dist: pyupgrade; extra == "testing"
50
+ Dynamic: license-file
38
51
 
39
52
  # analyzeAudio
40
53
 
@@ -126,12 +139,45 @@ print(audioAspects['Chromagram']['analyzerParameters'])
126
139
  'Signal entropy': float
127
140
  'Spectral Bandwidth': NDArray[float64] # shape(..., 1, frames)
128
141
  'Spectral Bandwidth mean': float
129
- 'Spectral centroid': NDArray[float64] # shape(channels, frames)
130
- 'Spectral centroid mean': float
131
142
  'Spectral Centroid': NDArray[float64] # shape(..., 1, frames)
132
143
  'Spectral Centroid mean': float
133
144
  'Spectral Contrast': NDArray[float64] # shape(..., 7, frames)
134
145
  'Spectral Contrast mean': float
146
+ 'Spectral Flatness': NDArray[float64] # shape(..., 1, frames)
147
+ 'Spectral Flatness mean': float
148
+ 'SRMR': NDArray[float64] # shape(...)
149
+ 'SRMR mean': float
150
+ 'Tempo': NDArray[float64] # shape(...)
151
+ 'Tempo mean': float
152
+ 'Tempogram': NDArray[float64] # shape(..., 384, samples)
153
+ 'Tempogram mean': float
154
+ 'Zero-crossing rate': NDArray[float64] # shape(..., 1, frames)
155
+ 'Zero-crossing rate mean': float
156
+ 'Zero-crossings rate': float
157
+ ```
158
+
159
+ ### I had to revert back to these
160
+
161
+ ```python
162
+ 'Spectral centroid': float
163
+ 'Spectral crest': float
164
+ 'Spectral decrease': float
165
+ 'Spectral entropy': float
166
+ 'Spectral flatness': float
167
+ 'Spectral flux': float
168
+ 'Spectral kurtosis': float
169
+ 'Spectral rolloff': float
170
+ 'Spectral skewness': float
171
+ 'Spectral slope': float
172
+ 'Spectral spread': float
173
+ 'Spectral variance': float
174
+ ```
175
+
176
+ ### Removed (temporarily, I hope)
177
+
178
+ ```python
179
+ 'Spectral centroid': NDArray[float64] # shape(channels, frames)
180
+ 'Spectral centroid mean': float
135
181
  'Spectral crest': NDArray[float64] # shape(channels, frames)
136
182
  'Spectral crest mean': float
137
183
  'Spectral decrease': NDArray[float64] # shape(channels, frames)
@@ -140,8 +186,6 @@ print(audioAspects['Chromagram']['analyzerParameters'])
140
186
  'Spectral entropy mean': float
141
187
  'Spectral flatness': NDArray[float64] # shape(channels, frames)
142
188
  'Spectral flatness mean': float
143
- 'Spectral Flatness': NDArray[float64] # shape(..., 1, frames)
144
- 'Spectral Flatness mean': float
145
189
  'Spectral flux': NDArray[float64] # shape(channels, frames)
146
190
  'Spectral flux mean': float
147
191
  'Spectral kurtosis': NDArray[float64] # shape(channels, frames)
@@ -156,15 +200,6 @@ print(audioAspects['Chromagram']['analyzerParameters'])
156
200
  'Spectral spread mean': float
157
201
  'Spectral variance': NDArray[float64] # shape(channels, frames)
158
202
  'Spectral variance mean': float
159
- 'SRMR': NDArray[float64] # shape(...)
160
- 'SRMR mean': float
161
- 'Tempo': NDArray[float64] # shape(...)
162
- 'Tempo mean': float
163
- 'Tempogram': NDArray[float64] # shape(..., 384, samples)
164
- 'Tempogram mean': float
165
- 'Zero-crossing rate': NDArray[float64] # shape(..., 1, frames)
166
- 'Zero-crossing rate mean': float
167
- 'Zero-crossings rate': float
168
203
  ```
169
204
 
170
205
  ## Installation
@@ -178,4 +213,4 @@ pip install analyzeAudio
178
213
  [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
179
214
  [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
180
215
 
181
- [![CC-BY-NC-4.0](https://github.com/hunterhogan/analyzeAudio/blob/main/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
216
+ [![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/)
@@ -88,12 +88,45 @@ print(audioAspects['Chromagram']['analyzerParameters'])
88
88
  'Signal entropy': float
89
89
  'Spectral Bandwidth': NDArray[float64] # shape(..., 1, frames)
90
90
  'Spectral Bandwidth mean': float
91
- 'Spectral centroid': NDArray[float64] # shape(channels, frames)
92
- 'Spectral centroid mean': float
93
91
  'Spectral Centroid': NDArray[float64] # shape(..., 1, frames)
94
92
  'Spectral Centroid mean': float
95
93
  'Spectral Contrast': NDArray[float64] # shape(..., 7, frames)
96
94
  'Spectral Contrast mean': float
95
+ 'Spectral Flatness': NDArray[float64] # shape(..., 1, frames)
96
+ 'Spectral Flatness mean': float
97
+ 'SRMR': NDArray[float64] # shape(...)
98
+ 'SRMR mean': float
99
+ 'Tempo': NDArray[float64] # shape(...)
100
+ 'Tempo mean': float
101
+ 'Tempogram': NDArray[float64] # shape(..., 384, samples)
102
+ 'Tempogram mean': float
103
+ 'Zero-crossing rate': NDArray[float64] # shape(..., 1, frames)
104
+ 'Zero-crossing rate mean': float
105
+ 'Zero-crossings rate': float
106
+ ```
107
+
108
+ ### I had to revert back to these
109
+
110
+ ```python
111
+ 'Spectral centroid': float
112
+ 'Spectral crest': float
113
+ 'Spectral decrease': float
114
+ 'Spectral entropy': float
115
+ 'Spectral flatness': float
116
+ 'Spectral flux': float
117
+ 'Spectral kurtosis': float
118
+ 'Spectral rolloff': float
119
+ 'Spectral skewness': float
120
+ 'Spectral slope': float
121
+ 'Spectral spread': float
122
+ 'Spectral variance': float
123
+ ```
124
+
125
+ ### Removed (temporarily, I hope)
126
+
127
+ ```python
128
+ 'Spectral centroid': NDArray[float64] # shape(channels, frames)
129
+ 'Spectral centroid mean': float
97
130
  'Spectral crest': NDArray[float64] # shape(channels, frames)
98
131
  'Spectral crest mean': float
99
132
  'Spectral decrease': NDArray[float64] # shape(channels, frames)
@@ -102,8 +135,6 @@ print(audioAspects['Chromagram']['analyzerParameters'])
102
135
  'Spectral entropy mean': float
103
136
  'Spectral flatness': NDArray[float64] # shape(channels, frames)
104
137
  'Spectral flatness mean': float
105
- 'Spectral Flatness': NDArray[float64] # shape(..., 1, frames)
106
- 'Spectral Flatness mean': float
107
138
  'Spectral flux': NDArray[float64] # shape(channels, frames)
108
139
  'Spectral flux mean': float
109
140
  'Spectral kurtosis': NDArray[float64] # shape(channels, frames)
@@ -118,15 +149,6 @@ print(audioAspects['Chromagram']['analyzerParameters'])
118
149
  'Spectral spread mean': float
119
150
  'Spectral variance': NDArray[float64] # shape(channels, frames)
120
151
  'Spectral variance mean': float
121
- 'SRMR': NDArray[float64] # shape(...)
122
- 'SRMR mean': float
123
- 'Tempo': NDArray[float64] # shape(...)
124
- 'Tempo mean': float
125
- 'Tempogram': NDArray[float64] # shape(..., 384, samples)
126
- 'Tempogram mean': float
127
- 'Zero-crossing rate': NDArray[float64] # shape(..., 1, frames)
128
- 'Zero-crossing rate mean': float
129
- 'Zero-crossings rate': float
130
152
  ```
131
153
 
132
154
  ## Installation
@@ -140,4 +162,4 @@ pip install analyzeAudio
140
162
  [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
141
163
  [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
142
164
 
143
- [![CC-BY-NC-4.0](https://github.com/hunterhogan/analyzeAudio/blob/main/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
165
+ [![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/)
@@ -40,7 +40,7 @@ def getSI_SDRmean(pathFilenameAlpha: str | PathLike[Any], pathFilenameBeta: str
40
40
  return SI_SDRmean
41
41
 
42
42
  @cachetools.cached(cache=cacheAudioAnalyzers)
43
- def ffprobeShotgunAndCache(pathFilename: str | PathLike[Any]) -> dict[str, float | numpy.ndarray]:
43
+ def ffprobeShotgunAndCache(pathFilename: str | PathLike[Any]) -> dict[str, float]:
44
44
  # for lavfi amovie/movie, the colons after driveLetter letters need to be escaped twice.
45
45
  pFn = pathlib.PureWindowsPath(pathFilename)
46
46
  lavfiPathFilename = pFn.drive.replace(":", "\\\\:")+pathlib.PureWindowsPath(pFn.root,pFn.relative_to(pFn.anchor)).as_posix()
@@ -63,14 +63,14 @@ def ffprobeShotgunAndCache(pathFilename: str | PathLike[Any]) -> dict[str, float
63
63
  stdoutFFprobe, _DISCARDstderr = systemProcessFFprobe.communicate()
64
64
  FFprobeStructured = pythonizeFFprobe(stdoutFFprobe.decode('utf-8'))[-1]
65
65
 
66
- dictionaryAspectsAnalyzed: dict[str, float | numpy.ndarray] = {}
66
+ dictionaryAspectsAnalyzed: dict[str, float] = {}
67
67
  if 'aspectralstats' in FFprobeStructured:
68
68
  for keyName in FFprobeStructured['aspectralstats']:
69
69
  # No matter how many channels, each keyName is `numpy.ndarray[tuple[int, int], numpy.dtype[numpy.float64]]`
70
70
  # where `tuple[int, int]` is (channel, frame)
71
71
  # NOTE (as of this writing) `registrar` can only understand the generic class `numpy.ndarray` and not more specific typing
72
- dictionaryAspectsAnalyzed[keyName] = FFprobeStructured['aspectralstats'][keyName]
73
- # dictionaryAspectsAnalyzed[keyName] = numpy.mean(FFprobeStructured['aspectralstats'][keyName]).astype(float)
72
+ # dictionaryAspectsAnalyzed[keyName] = FFprobeStructured['aspectralstats'][keyName]
73
+ dictionaryAspectsAnalyzed[keyName] = numpy.mean(FFprobeStructured['aspectralstats'][keyName]).astype(float)
74
74
  if 'r128' in FFprobeStructured:
75
75
  for keyName in FFprobeStructured['r128']:
76
76
  dictionaryAspectsAnalyzed[keyName] = FFprobeStructured['r128'][keyName][-1]
@@ -133,55 +133,55 @@ def analyzeLUFShigh(pathFilename: str | PathLike[Any]) -> float | None:
133
133
  return ffprobeShotgunAndCache(pathFilename).get('LRA.high')
134
134
 
135
135
  @registrationAudioAspect('Power spectral density')
136
- def analyzeMean(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
136
+ def analyzeMean(pathFilename: str | PathLike[Any]) -> float | None:
137
137
  return ffprobeShotgunAndCache(pathFilename).get('mean')
138
138
 
139
139
  @registrationAudioAspect('Spectral variance')
140
- def analyzeVariance(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
140
+ def analyzeVariance(pathFilename: str | PathLike[Any]) -> float | None:
141
141
  return ffprobeShotgunAndCache(pathFilename).get('variance')
142
142
 
143
143
  @registrationAudioAspect('Spectral centroid')
144
- def analyzeCentroid(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
144
+ def analyzeCentroid(pathFilename: str | PathLike[Any]) -> float | None:
145
145
  return ffprobeShotgunAndCache(pathFilename).get('centroid')
146
146
 
147
147
  @registrationAudioAspect('Spectral spread')
148
- def analyzeSpread(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
148
+ def analyzeSpread(pathFilename: str | PathLike[Any]) -> float | None:
149
149
  return ffprobeShotgunAndCache(pathFilename).get('spread')
150
150
 
151
151
  @registrationAudioAspect('Spectral skewness')
152
- def analyzeSkewness(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
152
+ def analyzeSkewness(pathFilename: str | PathLike[Any]) -> float | None:
153
153
  return ffprobeShotgunAndCache(pathFilename).get('skewness')
154
154
 
155
155
  @registrationAudioAspect('Spectral kurtosis')
156
- def analyzeKurtosis(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
156
+ def analyzeKurtosis(pathFilename: str | PathLike[Any]) -> float | None:
157
157
  return ffprobeShotgunAndCache(pathFilename).get('kurtosis')
158
158
 
159
159
  @registrationAudioAspect('Spectral entropy')
160
- def analyzeSpectralEntropy(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
160
+ def analyzeSpectralEntropy(pathFilename: str | PathLike[Any]) -> float | None:
161
161
  return ffprobeShotgunAndCache(pathFilename).get('entropy')
162
162
 
163
163
  @registrationAudioAspect('Spectral flatness')
164
- def analyzeFlatness(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
164
+ def analyzeFlatness(pathFilename: str | PathLike[Any]) -> float | None:
165
165
  return ffprobeShotgunAndCache(pathFilename).get('flatness')
166
166
 
167
167
  @registrationAudioAspect('Spectral crest')
168
- def analyzeCrest(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
168
+ def analyzeCrest(pathFilename: str | PathLike[Any]) -> float | None:
169
169
  return ffprobeShotgunAndCache(pathFilename).get('crest')
170
170
 
171
171
  @registrationAudioAspect('Spectral flux')
172
- def analyzeFlux(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
172
+ def analyzeFlux(pathFilename: str | PathLike[Any]) -> float | None:
173
173
  return ffprobeShotgunAndCache(pathFilename).get('flux')
174
174
 
175
175
  @registrationAudioAspect('Spectral slope')
176
- def analyzeSlope(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
176
+ def analyzeSlope(pathFilename: str | PathLike[Any]) -> float | None:
177
177
  return ffprobeShotgunAndCache(pathFilename).get('slope')
178
178
 
179
179
  @registrationAudioAspect('Spectral decrease')
180
- def analyzeDecrease(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
180
+ def analyzeDecrease(pathFilename: str | PathLike[Any]) -> float | None:
181
181
  return ffprobeShotgunAndCache(pathFilename).get('decrease')
182
182
 
183
183
  @registrationAudioAspect('Spectral rolloff')
184
- def analyzeRolloff(pathFilename: str | PathLike[Any]) -> numpy.ndarray:
184
+ def analyzeRolloff(pathFilename: str | PathLike[Any]) -> float | None:
185
185
  return ffprobeShotgunAndCache(pathFilename).get('rolloff')
186
186
 
187
187
  @registrationAudioAspect('Abs_Peak_count')
@@ -1,14 +1,12 @@
1
1
  from collections.abc import Callable, Sequence
2
2
  from concurrent.futures import ProcessPoolExecutor, as_completed
3
3
  from numpy.typing import NDArray
4
+ from os import PathLike
4
5
  from typing import Any, cast, ParamSpec, TypeAlias, TYPE_CHECKING, TypeVar
5
6
  from Z0Z_tools import defineConcurrencyLimit, oopsieKwargsie, stft
6
7
  import cachetools
7
8
  import inspect
8
- import librosa
9
- import multiprocessing
10
9
  import numpy
11
- from os import PathLike
12
10
  import pathlib
13
11
  import soundfile
14
12
  import torch
@@ -19,8 +17,11 @@ if TYPE_CHECKING:
19
17
  else:
20
18
  TypedDict = dict
21
19
 
22
- if __name__ == '__main__':
23
- multiprocessing.set_start_method('spawn')
20
+ from multiprocessing import set_start_method as multiprocessing_set_start_method
21
+ try:
22
+ multiprocessing_set_start_method('spawn')
23
+ except RuntimeError:
24
+ pass
24
25
 
25
26
  warnings.filterwarnings('ignore', category=UserWarning, module='torchmetrics', message='.*fast=True.*')
26
27
 
@@ -112,9 +113,9 @@ def analyzeAudioFile(pathFilename: str | PathLike[Any], listAspectNames: list[st
112
113
  else:
113
114
  raise ERRORmessage
114
115
 
115
- spectrogram = stft(waveform, sampleRate=sampleRate)
116
- spectrogramMagnitude = numpy.absolute(spectrogram)
117
- spectrogramPower = spectrogramMagnitude ** 2
116
+ # spectrogram = stft(waveform, sampleRate=sampleRate)
117
+ # spectrogramMagnitude = numpy.absolute(spectrogram)
118
+ # spectrogramPower = spectrogramMagnitude ** 2
118
119
 
119
120
  pytorchOnCPU = not torch.cuda.is_available() # False if GPU available, True if not
120
121
 
File without changes
@@ -1,23 +1,33 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: analyzeAudio
3
- Version: 0.0.13
3
+ Version: 0.0.15
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
9
  Project-URL: Repository, https://github.com/hunterhogan/analyzeAudio.git
10
- Keywords: audio,analysis,measurement,metrics,torch
10
+ Keywords: audio,analysis,measurement,metrics,torch,spectrum,spectral,waveform,loudness,LUFS,RMS,FFmpeg,FFprobe,SRMR,audio-analysis,signal-processing
11
11
  Classifier: Development Status :: 3 - Alpha
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Intended Audience :: Information Technology
15
17
  Classifier: Intended Audience :: Other Audience
16
18
  Classifier: Natural Language :: English
17
19
  Classifier: Operating System :: OS Independent
18
20
  Classifier: Programming Language :: Python
19
21
  Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Topic :: Multimedia :: Sound/Audio
20
27
  Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
28
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
29
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
30
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
31
  Classifier: Typing :: Typed
22
32
  Requires-Python: >=3.10
23
33
  Description-Content-Type: text/markdown
@@ -26,15 +36,18 @@ Requires-Dist: cachetools
26
36
  Requires-Dist: librosa
27
37
  Requires-Dist: numpy
28
38
  Requires-Dist: optype[numpy]
39
+ Requires-Dist: standard-aifc; python_version >= "3.13"
40
+ Requires-Dist: standard-sunau; python_version >= "3.13"
29
41
  Requires-Dist: torch
30
42
  Requires-Dist: torchmetrics[audio]
31
43
  Requires-Dist: tqdm
32
44
  Requires-Dist: Z0Z_tools
33
45
  Provides-Extra: testing
46
+ Requires-Dist: pytest; extra == "testing"
34
47
  Requires-Dist: pytest-cov; extra == "testing"
35
48
  Requires-Dist: pytest-xdist; extra == "testing"
36
- Requires-Dist: pytest; extra == "testing"
37
49
  Requires-Dist: pyupgrade; extra == "testing"
50
+ Dynamic: license-file
38
51
 
39
52
  # analyzeAudio
40
53
 
@@ -126,12 +139,45 @@ print(audioAspects['Chromagram']['analyzerParameters'])
126
139
  'Signal entropy': float
127
140
  'Spectral Bandwidth': NDArray[float64] # shape(..., 1, frames)
128
141
  'Spectral Bandwidth mean': float
129
- 'Spectral centroid': NDArray[float64] # shape(channels, frames)
130
- 'Spectral centroid mean': float
131
142
  'Spectral Centroid': NDArray[float64] # shape(..., 1, frames)
132
143
  'Spectral Centroid mean': float
133
144
  'Spectral Contrast': NDArray[float64] # shape(..., 7, frames)
134
145
  'Spectral Contrast mean': float
146
+ 'Spectral Flatness': NDArray[float64] # shape(..., 1, frames)
147
+ 'Spectral Flatness mean': float
148
+ 'SRMR': NDArray[float64] # shape(...)
149
+ 'SRMR mean': float
150
+ 'Tempo': NDArray[float64] # shape(...)
151
+ 'Tempo mean': float
152
+ 'Tempogram': NDArray[float64] # shape(..., 384, samples)
153
+ 'Tempogram mean': float
154
+ 'Zero-crossing rate': NDArray[float64] # shape(..., 1, frames)
155
+ 'Zero-crossing rate mean': float
156
+ 'Zero-crossings rate': float
157
+ ```
158
+
159
+ ### I had to revert back to these
160
+
161
+ ```python
162
+ 'Spectral centroid': float
163
+ 'Spectral crest': float
164
+ 'Spectral decrease': float
165
+ 'Spectral entropy': float
166
+ 'Spectral flatness': float
167
+ 'Spectral flux': float
168
+ 'Spectral kurtosis': float
169
+ 'Spectral rolloff': float
170
+ 'Spectral skewness': float
171
+ 'Spectral slope': float
172
+ 'Spectral spread': float
173
+ 'Spectral variance': float
174
+ ```
175
+
176
+ ### Removed (temporarily, I hope)
177
+
178
+ ```python
179
+ 'Spectral centroid': NDArray[float64] # shape(channels, frames)
180
+ 'Spectral centroid mean': float
135
181
  'Spectral crest': NDArray[float64] # shape(channels, frames)
136
182
  'Spectral crest mean': float
137
183
  'Spectral decrease': NDArray[float64] # shape(channels, frames)
@@ -140,8 +186,6 @@ print(audioAspects['Chromagram']['analyzerParameters'])
140
186
  'Spectral entropy mean': float
141
187
  'Spectral flatness': NDArray[float64] # shape(channels, frames)
142
188
  'Spectral flatness mean': float
143
- 'Spectral Flatness': NDArray[float64] # shape(..., 1, frames)
144
- 'Spectral Flatness mean': float
145
189
  'Spectral flux': NDArray[float64] # shape(channels, frames)
146
190
  'Spectral flux mean': float
147
191
  'Spectral kurtosis': NDArray[float64] # shape(channels, frames)
@@ -156,15 +200,6 @@ print(audioAspects['Chromagram']['analyzerParameters'])
156
200
  'Spectral spread mean': float
157
201
  'Spectral variance': NDArray[float64] # shape(channels, frames)
158
202
  'Spectral variance mean': float
159
- 'SRMR': NDArray[float64] # shape(...)
160
- 'SRMR mean': float
161
- 'Tempo': NDArray[float64] # shape(...)
162
- 'Tempo mean': float
163
- 'Tempogram': NDArray[float64] # shape(..., 384, samples)
164
- 'Tempogram mean': float
165
- 'Zero-crossing rate': NDArray[float64] # shape(..., 1, frames)
166
- 'Zero-crossing rate mean': float
167
- 'Zero-crossings rate': float
168
203
  ```
169
204
 
170
205
  ## Installation
@@ -178,4 +213,4 @@ pip install analyzeAudio
178
213
  [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
179
214
  [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
180
215
 
181
- [![CC-BY-NC-4.0](https://github.com/hunterhogan/analyzeAudio/blob/main/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)
216
+ [![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/)
@@ -7,6 +7,7 @@ analyzeAudio/analyzersUseSpectrogram.py
7
7
  analyzeAudio/analyzersUseTensor.py
8
8
  analyzeAudio/analyzersUseWaveform.py
9
9
  analyzeAudio/audioAspectsRegistry.py
10
+ analyzeAudio/py.typed
10
11
  analyzeAudio/pythonator.py
11
12
  analyzeAudio.egg-info/PKG-INFO
12
13
  analyzeAudio.egg-info/SOURCES.txt
@@ -7,8 +7,12 @@ torchmetrics[audio]
7
7
  tqdm
8
8
  Z0Z_tools
9
9
 
10
+ [:python_version >= "3.13"]
11
+ standard-aifc
12
+ standard-sunau
13
+
10
14
  [testing]
15
+ pytest
11
16
  pytest-cov
12
17
  pytest-xdist
13
- pytest
14
18
  pyupgrade
@@ -9,35 +9,47 @@ classifiers = [
9
9
  "Environment :: Console",
10
10
  "Intended Audience :: Developers",
11
11
  "Intended Audience :: End Users/Desktop",
12
+ "Intended Audience :: Science/Research",
13
+ "Intended Audience :: Information Technology",
12
14
  "Intended Audience :: Other Audience",
13
15
  "Natural Language :: English",
14
16
  "Operating System :: OS Independent",
15
17
  "Programming Language :: Python",
16
- "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Multimedia :: Sound/Audio",
17
24
  "Topic :: Multimedia :: Sound/Audio :: Analysis",
25
+ "Topic :: Multimedia :: Sound/Audio :: Conversion",
26
+ "Topic :: Scientific/Engineering :: Information Analysis",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
18
28
  "Typing :: Typed",]
19
29
  dependencies = [
20
30
  "cachetools",
21
31
  "librosa",
22
32
  "numpy",
23
33
  "optype[numpy]",
34
+ "standard-aifc;python_version>='3.13'",
35
+ "standard-sunau;python_version>='3.13'",
24
36
  "torch",
25
37
  "torchmetrics[audio]",
26
38
  "tqdm",
27
39
  "Z0Z_tools",]
28
40
  description = "Measure one or more aspects of one or more audio files."
29
- keywords = ["audio", "analysis", "measurement", "metrics", "torch"]
41
+ keywords = ["audio", "analysis", "measurement", "metrics", "torch", "spectrum", "spectral", "waveform", "loudness", "LUFS", "RMS", "FFmpeg", "FFprobe", "SRMR", "audio-analysis", "signal-processing"]
30
42
  license = { 'text' = "CC-BY-NC-4.0" }
31
43
  name = "analyzeAudio"
32
44
  optional-dependencies = { testing = [
45
+ "pytest",
33
46
  "pytest-cov",
34
47
  "pytest-xdist",
35
- "pytest",
36
- "pyupgrade",] }
48
+ "pyupgrade",] }
37
49
  readme = { file = "README.md", content-type = "text/markdown" }
38
50
  requires-python = ">=3.10"
39
51
  urls = { Donate = "https://www.patreon.com/integrated", Homepage = "https://github.com/hunterhogan/analyzeAudio", Repository = "https://github.com/hunterhogan/analyzeAudio.git" }
40
- version = "0.0.13"
52
+ version = "0.0.15"
41
53
 
42
54
  [project.scripts]
43
55
  whatMeasurements = "analyzeAudio.audioAspectsRegistry:getListAvailableAudioAspects"
@@ -56,12 +68,13 @@ run = { branch = true, concurrency = [
56
68
  xml = { output = "tests/coverage/coverage.xml" }
57
69
 
58
70
  [tool.pytest.ini_options]
59
- log_auto_indent = ["On"]
71
+ log_auto_indent = true
60
72
  addopts = ["--color=yes", "-n 4"]
61
73
  testpaths = ["tests"]
62
74
 
63
- [tool.setuptools.packages.find]
64
- where = ["."]
75
+ [tool.setuptools]
76
+ package-data = { "*" = ["py.typed"] }
77
+ packages = { find = {} }
65
78
 
66
79
  [tool.updateCitation]
67
80
  filenameCitationDOTcff = 'CITATION.cff'
File without changes
File without changes