modusa 0.4.24__py3-none-any.whl → 0.4.26__py3-none-any.whl
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.
- README.md +64 -0
- modusa/__init__.py +1 -1
- modusa/tools/audio_loader.py +10 -3
- modusa/tools/plotter.py +1 -1
- {modusa-0.4.24.dist-info → modusa-0.4.26.dist-info}/METADATA +1 -1
- {modusa-0.4.24.dist-info → modusa-0.4.26.dist-info}/RECORD +11 -9
- modusa-0.4.26.dist-info/licenses/LICENSE.md +9 -0
- pyproject.toml +85 -0
- modusa/.DS_Store +0 -0
- /modusa-0.4.24.dist-info/licenses/LICENSE.md → /LICENSE.md +0 -0
- {modusa-0.4.24.dist-info → modusa-0.4.26.dist-info}/WHEEL +0 -0
- {modusa-0.4.24.dist-info → modusa-0.4.26.dist-info}/entry_points.txt +0 -0
README.md
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# modusa
|
2
|
+
|
3
|
+
[**modusa**](https://meluron-toolbox.github.io/modusa/) is a library with utility tools especially for audio signals.
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
> modusa is under active development. You can install the latest version via:
|
10
|
+
|
11
|
+
```
|
12
|
+
pip install modusa
|
13
|
+
```
|
14
|
+
|
15
|
+
---
|
16
|
+
|
17
|
+
## Tests
|
18
|
+
|
19
|
+
```
|
20
|
+
pytest tests/
|
21
|
+
```
|
22
|
+
|
23
|
+
---
|
24
|
+
|
25
|
+
## Status
|
26
|
+
|
27
|
+
modusa is in **early alpha**. Expect rapid iteration, breaking changes, and big ideas.
|
28
|
+
If you like the direction, consider ⭐ starring the repo and opening issues or ideas.
|
29
|
+
|
30
|
+
---
|
31
|
+
|
32
|
+
## Few useful command
|
33
|
+
|
34
|
+
To push doc changes
|
35
|
+
```
|
36
|
+
ghp-import -n -p -f docs/build/html
|
37
|
+
```
|
38
|
+
|
39
|
+
To create a dist
|
40
|
+
```
|
41
|
+
pdm build
|
42
|
+
```
|
43
|
+
|
44
|
+
To upload on pypi
|
45
|
+
```
|
46
|
+
twine upload dist/*
|
47
|
+
```
|
48
|
+
|
49
|
+
## About
|
50
|
+
|
51
|
+
**modusa** is developed and maintained by [meluron](https://www.github.com/meluron),
|
52
|
+
|
53
|
+
---
|
54
|
+
|
55
|
+
## License
|
56
|
+
|
57
|
+
MIT License. See `LICENSE` for details.
|
58
|
+
|
59
|
+
---
|
60
|
+
|
61
|
+
## Contributions
|
62
|
+
|
63
|
+
Pull requests, ideas, and discussions are welcome!
|
64
|
+
No matter which domain you are in, if you work with any signal, we'd love your input.
|
modusa/__init__.py
CHANGED
modusa/tools/audio_loader.py
CHANGED
@@ -99,12 +99,19 @@ def load(path, sr=None, trim=None, ch=None):
|
|
99
99
|
File name stem.
|
100
100
|
"""
|
101
101
|
path = Path(path)
|
102
|
-
ffmpeg_exe = ffmpeg.get_ffmpeg_exe()
|
103
|
-
|
104
|
-
yt = False # Is the path a youtube URL
|
105
102
|
|
103
|
+
# If the path is a YouTube URL, turn on the yt flag
|
104
|
+
yt = False # By default, set to false
|
106
105
|
if ".youtube" in str(path):
|
107
106
|
yt = True
|
107
|
+
|
108
|
+
# For local files, check if the audio exists
|
109
|
+
elif not path.exists():
|
110
|
+
raise FileExistsError(f"{path} does not exist")
|
111
|
+
|
112
|
+
ffmpeg_exe = ffmpeg.get_ffmpeg_exe()
|
113
|
+
|
114
|
+
if yt:
|
108
115
|
try:
|
109
116
|
path: Path = _load_audio_from_youtube(url=str(path))
|
110
117
|
except Exception as e:
|
modusa/tools/plotter.py
CHANGED
@@ -31,7 +31,7 @@ def _load_devanagari_font():
|
|
31
31
|
hindi_font = fm.FontProperties(fname=str(font_path))
|
32
32
|
|
33
33
|
# Set as default rcParam
|
34
|
-
mpl.rcParams['font.family'] = hindi_font.get_name()
|
34
|
+
mpl.rcParams['font.family'] = [hindi_font.get_name(), 'DejaVu Sans'] # Fallback to DejaVu Sans
|
35
35
|
|
36
36
|
#==============
|
37
37
|
|
@@ -1,9 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
modusa-0.4.
|
4
|
-
modusa-0.4.
|
5
|
-
modusa
|
6
|
-
modusa/
|
1
|
+
LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
|
2
|
+
README.md,sha256=Ybe2rcDecfSCiUpec2n7btQvgyi4R9JG0bfdwSWijWk,981
|
3
|
+
modusa-0.4.26.dist-info/METADATA,sha256=ERGMu1mqdrLHK4UUTGRzAKO0iV4Ng-bPKXFhIef40U8,1442
|
4
|
+
modusa-0.4.26.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
5
|
+
modusa-0.4.26.dist-info/entry_points.txt,sha256=fmKpleVXj6CdaBVL14WoEy6xx7JQCs85jvzwTi3lePM,73
|
6
|
+
modusa-0.4.26.dist-info/licenses/LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
|
7
|
+
modusa/__init__.py,sha256=kN-TMK9l5A0M6XHLRUBzQHaxFQXEncJBlUnWPcRFxE4,324
|
7
8
|
modusa/config.py,sha256=bTqK4t00FZqERVITrxW_q284aDDJAa9aMSfFknfR-oU,280
|
8
9
|
modusa/decorators.py,sha256=8zeNX_wE37O6Vp0ysR4-WCZaEL8mq8dyCF_I5DHOzks,5905
|
9
10
|
modusa/devtools/generate_docs_source.py,sha256=UDflHsk-Yh9-3YJTVBzKL32y8hcxiRgAlFEBTMiDqwM,3301
|
@@ -45,13 +46,13 @@ modusa/tools/__init__.py,sha256=S7P1uYckyUdkha2UX9uj4P7mqpF6cc5SHqiW6NEupgs,342
|
|
45
46
|
modusa/tools/_plotter_old.py,sha256=KGow7mihA2H1WNq7s5bpivhCgGo2qVIeDaO6iabpsrg,19294
|
46
47
|
modusa/tools/ann_loader.py,sha256=m6Qu6jXnQ8LfUhKItoHSaHlGxUyzUJlGEyu4_50qJ8w,3099
|
47
48
|
modusa/tools/audio_converter.py,sha256=415qBoPm2sBIuBSI7m1XBKm0AbmVmPydIPPr-uO8D3c,1778
|
48
|
-
modusa/tools/audio_loader.py,sha256=
|
49
|
+
modusa/tools/audio_loader.py,sha256=xmeodrJqJV5j9-lrUPk3W9-bdEA4-6RvTAn8pIErUN0,4084
|
49
50
|
modusa/tools/audio_player.py,sha256=kyBUnodkOE9Ox-hKHkfPeGAQ1RPTddbZYXO1ezz6-9w,2494
|
50
51
|
modusa/tools/audio_recorder.py,sha256=K_LGqsPdjTdf3figEZTSQLmgMzYWgz18HTO8C1j5fE4,2788
|
51
52
|
modusa/tools/audio_saver.py,sha256=ldzfr_AydsHTnKbxmBLJblN-hLzTmOlppOm306xI4Ug,510
|
52
53
|
modusa/tools/base.py,sha256=C0ESJ0mIfjjRlAkRbSetNtMoOfS6IrHBjexRp3l_Mh4,1293
|
53
54
|
modusa/tools/math_ops.py,sha256=ZZ7U4DgqT7cOeE7_Lzi_Qq-48WYfwR9_osbZwTmE9eg,8690
|
54
|
-
modusa/tools/plotter.py,sha256=
|
55
|
+
modusa/tools/plotter.py,sha256=xXHibXf3cnFjgf_Hc_PM22yjC8W1s3160TjD7OTutcc,30903
|
55
56
|
modusa/tools/youtube_downloader.py,sha256=hB_X8-7nOHXOlxg6vv3wyhBLoAsWyomrULP6_uCQL7s,1698
|
56
57
|
modusa/utils/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
|
57
58
|
modusa/utils/config.py,sha256=cuGbqbovx5WDQq5rw3hIKcv3CnE5NttjacSOWnP1yu4,576
|
@@ -59,4 +60,5 @@ modusa/utils/excp.py,sha256=L9vhaGjKpv9viJYdmC9n5ndmk2GVbUBuFyZyhAQZmWY,906
|
|
59
60
|
modusa/utils/logger.py,sha256=K0rsnObeNKCxlNeSnVnJeRhgfmob6riB2uyU7h3dDmA,571
|
60
61
|
modusa/utils/np_func_cat.py,sha256=TyIFgRc6bARRMDnZxlVURO5Z0I-GWhxRONYyIv-Vwxs,1007
|
61
62
|
modusa/utils/plot.py,sha256=s_vNdxvKfwxEngvJPgrF1PcmxZNnNaaXPViHWjyjJ-c,5335
|
62
|
-
|
63
|
+
pyproject.toml,sha256=nwae_IgI7Uw_mvCI9FDA6lwLWR9JldruIlD63x_XZio,1413
|
64
|
+
modusa-0.4.26.dist-info/RECORD,,
|
@@ -0,0 +1,9 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 [Ankit Anand @meluron]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
pyproject.toml
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
[project]
|
2
|
+
name = "modusa"
|
3
|
+
dynamic = []
|
4
|
+
description = "A modular signal analysis python library."
|
5
|
+
authors = [
|
6
|
+
{ name = "Ankit Anand", email = "ankit0.anand0@gmail.com" },
|
7
|
+
]
|
8
|
+
dependencies = [
|
9
|
+
"numpy>=2.2.6",
|
10
|
+
"matplotlib>=3.10.3",
|
11
|
+
"yt-dlp==2025.9.23",
|
12
|
+
"IPython>=9.5.0",
|
13
|
+
"sounddevice>=0.5.2",
|
14
|
+
"ipywidgets>=8.1.7",
|
15
|
+
"imageio-ffmpeg>=0.6.0",
|
16
|
+
]
|
17
|
+
requires-python = ">=3.11"
|
18
|
+
readme = "README.md"
|
19
|
+
version = "0.4.26"
|
20
|
+
|
21
|
+
[project.license]
|
22
|
+
text = "MIT"
|
23
|
+
|
24
|
+
[project.scripts]
|
25
|
+
modusa-dev = "modusa.devtools.main:main"
|
26
|
+
|
27
|
+
[tool.pdm]
|
28
|
+
distribution = true
|
29
|
+
|
30
|
+
[tool.pdm.version]
|
31
|
+
source = "file"
|
32
|
+
path = "src/modusa/__init__.py"
|
33
|
+
|
34
|
+
[tool.pdm.dev-dependencies]
|
35
|
+
upload = [
|
36
|
+
"twine>=6.1.0",
|
37
|
+
]
|
38
|
+
test = [
|
39
|
+
"pytest>=8.4.0",
|
40
|
+
]
|
41
|
+
docs = [
|
42
|
+
"jupyter>=1.1.1",
|
43
|
+
"sphinx==8.1.2",
|
44
|
+
"sphinx-autodoc-typehints==2.1.0",
|
45
|
+
"sphinx-copybutton>=0.5.2",
|
46
|
+
"furo>=2024.8.6",
|
47
|
+
"nbsphinx==0.9.7",
|
48
|
+
"ghp-import>=2.1.0",
|
49
|
+
]
|
50
|
+
profiling = [
|
51
|
+
"snakeviz>=2.2.2",
|
52
|
+
"line-profiler>=4.2.0",
|
53
|
+
]
|
54
|
+
misc = [
|
55
|
+
"pandas>=2.3.0",
|
56
|
+
"rich>=14.0.0",
|
57
|
+
"questionary>=2.1.0",
|
58
|
+
]
|
59
|
+
|
60
|
+
[tool.pdm.package-dir]
|
61
|
+
"" = "src"
|
62
|
+
|
63
|
+
[tool.pdm.build]
|
64
|
+
includes = [
|
65
|
+
"src",
|
66
|
+
"README.md",
|
67
|
+
"LICENSE.md",
|
68
|
+
"pyproject.toml",
|
69
|
+
]
|
70
|
+
excludes = [
|
71
|
+
"tests/**",
|
72
|
+
"**/.DS_Store",
|
73
|
+
"__pycache__/**",
|
74
|
+
"*.pyc",
|
75
|
+
"dist",
|
76
|
+
"build",
|
77
|
+
".venv",
|
78
|
+
".git",
|
79
|
+
]
|
80
|
+
|
81
|
+
[build-system]
|
82
|
+
requires = [
|
83
|
+
"pdm-backend",
|
84
|
+
]
|
85
|
+
build-backend = "pdm.backend"
|
modusa/.DS_Store
DELETED
Binary file
|
File without changes
|
File without changes
|
File without changes
|