neverlib 0.2.7__py3-none-any.whl → 0.2.8__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.
- neverlib/QA/gen_init.py +107 -6
- neverlib/__init__.py +19 -0
- neverlib/audio_aug/__init__.py +56 -4
- neverlib/data_analyze/__init__.py +44 -0
- neverlib/filter/__init__.py +23 -0
- neverlib/filter/auto_eq/__init__.py +36 -0
- neverlib/metrics/__init__.py +37 -1
- neverlib/tests/__init__.py +33 -1
- neverlib/tests/test_imports.py +2 -0
- neverlib/utils/__init__.py +50 -5
- neverlib/utils/audio_split.py +1 -0
- neverlib/utils/utils.py +15 -0
- neverlib/vad/PreProcess.py +66 -66
- neverlib/vad/__init__.py +38 -0
- {neverlib-0.2.7.dist-info → neverlib-0.2.8.dist-info}/METADATA +1 -1
- {neverlib-0.2.7.dist-info → neverlib-0.2.8.dist-info}/RECORD +19 -19
- {neverlib-0.2.7.dist-info → neverlib-0.2.8.dist-info}/WHEEL +0 -0
- {neverlib-0.2.7.dist-info → neverlib-0.2.8.dist-info}/licenses/LICENSE +0 -0
- {neverlib-0.2.7.dist-info → neverlib-0.2.8.dist-info}/top_level.txt +0 -0
neverlib/QA/gen_init.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# 自动生成指定包目录下的 __init__.py(懒加载格式:lazy_loader.attach)
|
|
2
|
+
# 并且支持IDE友好的 __init__.py 版本
|
|
2
3
|
|
|
3
4
|
import ast
|
|
4
5
|
from pathlib import Path
|
|
@@ -43,7 +44,7 @@ def _extract_exports_from_module(py_file: Path) -> List[str]:
|
|
|
43
44
|
return sorted(exports)
|
|
44
45
|
|
|
45
46
|
|
|
46
|
-
def generate_init_for_directory(package_dir: Path) -> Path:
|
|
47
|
+
def generate_init_for_directory(package_dir: Path, ide_friendly: bool = False) -> Path:
|
|
47
48
|
"""
|
|
48
49
|
为指定目录生成懒加载版 __init__.py(覆盖写入)。
|
|
49
50
|
- 仅扫描一级子模块(同级 .py 文件),忽略以下划线开头的模块与 __init__.py 本身。
|
|
@@ -55,6 +56,10 @@ def generate_init_for_directory(package_dir: Path) -> Path:
|
|
|
55
56
|
submodules=["m1", "m2", ...],
|
|
56
57
|
submod_attrs={"m1": ["A", "B"], ...}
|
|
57
58
|
)
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
package_dir: 包目录路径
|
|
62
|
+
ide_friendly: 是否生成IDE友好版本(使用TYPE_CHECKING)
|
|
58
63
|
"""
|
|
59
64
|
package_dir = package_dir.resolve()
|
|
60
65
|
if not package_dir.is_dir():
|
|
@@ -76,6 +81,24 @@ def generate_init_for_directory(package_dir: Path) -> Path:
|
|
|
76
81
|
lines: List[str] = []
|
|
77
82
|
lines.append('# This file is auto-generated. Do NOT edit manually.')
|
|
78
83
|
lines.append('# Generated by neverlib.QA.gen_init')
|
|
84
|
+
|
|
85
|
+
if ide_friendly:
|
|
86
|
+
lines.append('')
|
|
87
|
+
lines.append('from typing import TYPE_CHECKING, Any')
|
|
88
|
+
lines.append('')
|
|
89
|
+
lines.append('if TYPE_CHECKING:')
|
|
90
|
+
lines.append(' # 仅在类型检查时导入,提供IDE补全支持')
|
|
91
|
+
|
|
92
|
+
# 生成 TYPE_CHECKING 导入
|
|
93
|
+
for module_name in sorted(module_to_exports.keys()):
|
|
94
|
+
exports = module_to_exports[module_name]
|
|
95
|
+
if exports:
|
|
96
|
+
imports = ', '.join(exports)
|
|
97
|
+
lines.append(f' from .{module_name} import {imports}')
|
|
98
|
+
|
|
99
|
+
lines.append('')
|
|
100
|
+
lines.append('# 运行时使用懒加载')
|
|
101
|
+
|
|
79
102
|
lines.append('from lazy_loader import attach')
|
|
80
103
|
lines.append('')
|
|
81
104
|
lines.append('__getattr__, __dir__, __all__ = attach(')
|
|
@@ -93,24 +116,102 @@ def generate_init_for_directory(package_dir: Path) -> Path:
|
|
|
93
116
|
lines.append(')')
|
|
94
117
|
lines.append('')
|
|
95
118
|
|
|
119
|
+
if ide_friendly:
|
|
120
|
+
# 生成显式的 __all__ 声明
|
|
121
|
+
lines.append('# 显式声明 __all__ 以便 IDE 识别')
|
|
122
|
+
lines.append('if TYPE_CHECKING:')
|
|
123
|
+
lines.append(' __all__ = [')
|
|
124
|
+
|
|
125
|
+
all_exports = []
|
|
126
|
+
for module_name in sorted(module_to_exports.keys()):
|
|
127
|
+
exports = module_to_exports[module_name]
|
|
128
|
+
for export in exports:
|
|
129
|
+
all_exports.append(f" '{export}',")
|
|
130
|
+
|
|
131
|
+
lines.extend(all_exports)
|
|
132
|
+
lines.append(' ]')
|
|
133
|
+
|
|
96
134
|
init_file = package_dir / '__init__.py'
|
|
97
135
|
init_file.write_text('\n'.join(lines), encoding='utf-8')
|
|
98
136
|
return init_file
|
|
99
137
|
|
|
100
138
|
|
|
139
|
+
def generate_all_packages(root_dir: Path, ide_friendly: bool = False) -> List[Path]:
|
|
140
|
+
"""
|
|
141
|
+
为所有子包生成 __init__.py 文件
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
root_dir: 根目录路径
|
|
145
|
+
ide_friendly: 是否生成IDE友好版本
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
生成的文件路径列表
|
|
149
|
+
"""
|
|
150
|
+
generated_files = []
|
|
151
|
+
processed_dirs = set() # 避免重复处理
|
|
152
|
+
|
|
153
|
+
# 查找所有包含 __init__.py 的包目录
|
|
154
|
+
for init_file in root_dir.rglob('__init__.py'):
|
|
155
|
+
package_dir = init_file.parent
|
|
156
|
+
|
|
157
|
+
# 跳过根目录和已处理的目录
|
|
158
|
+
if package_dir == root_dir or package_dir in processed_dirs:
|
|
159
|
+
continue
|
|
160
|
+
|
|
161
|
+
# 检查是否包含其他Python文件(不是只有__init__.py)
|
|
162
|
+
has_other_py_files = any(
|
|
163
|
+
f.name != '__init__.py' and f.suffix == '.py'
|
|
164
|
+
for f in package_dir.iterdir()
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
if has_other_py_files:
|
|
168
|
+
processed_dirs.add(package_dir)
|
|
169
|
+
try:
|
|
170
|
+
init_path = generate_init_for_directory(package_dir, ide_friendly=ide_friendly)
|
|
171
|
+
generated_files.append(init_path)
|
|
172
|
+
print(f'✅ 已生成: {init_path}')
|
|
173
|
+
except Exception as e:
|
|
174
|
+
print(f'❌ 生成失败 {package_dir}: {e}')
|
|
175
|
+
|
|
176
|
+
return generated_files
|
|
177
|
+
|
|
178
|
+
|
|
101
179
|
def main():
|
|
102
180
|
import argparse
|
|
103
181
|
|
|
104
182
|
parser = argparse.ArgumentParser(description='为指定包目录自动生成 __init__.py')
|
|
105
183
|
parser.add_argument('-p', '--package-dir', dest='package_dir',
|
|
106
|
-
default='../../neverlib/vad',
|
|
107
184
|
help='包目录路径,比如 /path/to/pkg 或 ./neverlib/utils')
|
|
185
|
+
parser.add_argument('--all', action='store_true',
|
|
186
|
+
help='为所有子包生成 __init__.py')
|
|
187
|
+
parser.add_argument('--ide-friendly', action='store_true',
|
|
188
|
+
help='生成IDE友好版本(使用TYPE_CHECKING)')
|
|
189
|
+
parser.add_argument('--backup', action='store_true',
|
|
190
|
+
help='备份原始文件')
|
|
108
191
|
args = parser.parse_args()
|
|
109
192
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
193
|
+
if args.all:
|
|
194
|
+
# 批量生成所有包
|
|
195
|
+
root_dir = Path(__file__).parent.parent # neverlib 目录
|
|
196
|
+
generated_files = generate_all_packages(root_dir, ide_friendly=args.ide_friendly)
|
|
197
|
+
else:
|
|
198
|
+
# 生成单个包
|
|
199
|
+
if not args.package_dir:
|
|
200
|
+
parser.error('请指定包目录路径 (-p) 或使用 --all 批量生成')
|
|
201
|
+
|
|
202
|
+
target_dir = Path(args.package_dir)
|
|
203
|
+
|
|
204
|
+
if args.backup and (target_dir / '__init__.py').exists():
|
|
205
|
+
backup_path = target_dir / '__init__.py.backup'
|
|
206
|
+
(target_dir / '__init__.py').rename(backup_path)
|
|
207
|
+
print(f"已备份原始文件到: {backup_path}")
|
|
208
|
+
|
|
209
|
+
init_path = generate_init_for_directory(target_dir, ide_friendly=args.ide_friendly)
|
|
210
|
+
print(f'已生成: {init_path}')
|
|
211
|
+
if args.ide_friendly:
|
|
212
|
+
print('✅ 已生成IDE友好版本(支持代码补全和类型检查)')
|
|
213
|
+
else:
|
|
214
|
+
print('ℹ️ 生成标准懒加载版本,如需IDE支持请使用 --ide-friendly 参数')
|
|
114
215
|
|
|
115
216
|
|
|
116
217
|
if __name__ == '__main__':
|
neverlib/__init__.py
CHANGED
|
@@ -37,6 +37,13 @@ try:
|
|
|
37
37
|
except Exception:
|
|
38
38
|
__version__ = "0.1.2" # 如果出错, 使用默认版本号
|
|
39
39
|
|
|
40
|
+
from typing import TYPE_CHECKING, Any
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if TYPE_CHECKING:
|
|
44
|
+
from .utils import get_path_list
|
|
45
|
+
from .filter import HPFilter
|
|
46
|
+
from .audio_aug import volume_norm
|
|
40
47
|
|
|
41
48
|
# 懒加载子包,减少初始导入开销
|
|
42
49
|
from lazy_loader import attach
|
|
@@ -45,4 +52,16 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
45
52
|
__name__,
|
|
46
53
|
submodules=["audio_aug", "data_analyze", "filter", "metrics", "utils", "vad", ],
|
|
47
54
|
# 只导出子模块,不直接导出函数
|
|
55
|
+
submod_attrs={
|
|
56
|
+
"utils": ["get_path_list"],
|
|
57
|
+
"filter": ["HPFilter"],
|
|
58
|
+
"audio_aug": ["volume_norm"],
|
|
59
|
+
}
|
|
48
60
|
)
|
|
61
|
+
|
|
62
|
+
if TYPE_CHECKING:
|
|
63
|
+
__all__ = [
|
|
64
|
+
"get_path_list",
|
|
65
|
+
"HPFilter",
|
|
66
|
+
"volume_norm",
|
|
67
|
+
]
|
neverlib/audio_aug/__init__.py
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
# This file is auto-generated. Do NOT edit manually.
|
|
2
2
|
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .HarmonicDistortion import apply_harmonic_distortion, apply_pedalboard_distortion
|
|
9
|
+
from .TFMask import FreqMask, TimeMask
|
|
10
|
+
from .audio_aug import add_reverb, get_snr_use_vad, limiter, measure_loudness, snr_aug_Interpolation, snr_aug_changeClean, snr_aug_changeNoise, snr_aug_vad_Interpolation, snr_diff_changeClean, snr_diff_changeNoise, volume_aug, volume_aug_dbrms, volume_aug_linmax, volume_aug_lufs, volume_convert, volume_norm
|
|
11
|
+
from .clip_aug import clipping_aug
|
|
12
|
+
from .coder_aug import aac_aug_save, amr_nb_aug, amr_wb_aug, flac_aug, flac_encode_save, mp3_aug, opus_aug_save, vorbis_aug
|
|
13
|
+
from .coder_aug2 import apply_codec_distortion, check_codec_available
|
|
14
|
+
from .loss_packet_aug import simulate_packet_loss_vectorized
|
|
15
|
+
from .quant_aug import apply_mulaw_quantization, apply_uniform_quantization
|
|
16
|
+
|
|
17
|
+
# 运行时使用懒加载
|
|
3
18
|
from lazy_loader import attach
|
|
4
19
|
|
|
5
20
|
__getattr__, __dir__, __all__ = attach(
|
|
6
21
|
__name__,
|
|
7
22
|
submodules=[
|
|
8
23
|
"HarmonicDistortion",
|
|
24
|
+
"TFDrop",
|
|
9
25
|
"TFMask",
|
|
10
26
|
"audio_aug",
|
|
11
27
|
"clip_aug",
|
|
@@ -17,10 +33,7 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
17
33
|
submod_attrs={
|
|
18
34
|
"HarmonicDistortion": ['apply_harmonic_distortion', 'apply_pedalboard_distortion'],
|
|
19
35
|
"TFMask": ['FreqMask', 'TimeMask'],
|
|
20
|
-
"audio_aug": ['add_reverb', 'get_snr_use_vad', 'limiter', 'measure_loudness', 'snr_aug_Interpolation',
|
|
21
|
-
'snr_aug_changeClean', 'snr_aug_changeNoise', 'snr_aug_vad_Interpolation',
|
|
22
|
-
'snr_diff_changeClean', 'snr_diff_changeNoise', 'volume_aug', 'volume_aug_dbrms',
|
|
23
|
-
'volume_aug_linmax', 'volume_aug_lufs', 'volume_convert', 'volume_norm'],
|
|
36
|
+
"audio_aug": ['add_reverb', 'get_snr_use_vad', 'limiter', 'measure_loudness', 'snr_aug_Interpolation', 'snr_aug_changeClean', 'snr_aug_changeNoise', 'snr_aug_vad_Interpolation', 'snr_diff_changeClean', 'snr_diff_changeNoise', 'volume_aug', 'volume_aug_dbrms', 'volume_aug_linmax', 'volume_aug_lufs', 'volume_convert', 'volume_norm'],
|
|
24
37
|
"clip_aug": ['clipping_aug'],
|
|
25
38
|
"coder_aug": ['aac_aug_save', 'amr_nb_aug', 'amr_wb_aug', 'flac_aug', 'flac_encode_save', 'mp3_aug', 'opus_aug_save', 'vorbis_aug'],
|
|
26
39
|
"coder_aug2": ['apply_codec_distortion', 'check_codec_available'],
|
|
@@ -28,3 +41,42 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
28
41
|
"quant_aug": ['apply_mulaw_quantization', 'apply_uniform_quantization'],
|
|
29
42
|
}
|
|
30
43
|
)
|
|
44
|
+
|
|
45
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
46
|
+
if TYPE_CHECKING:
|
|
47
|
+
__all__ = [
|
|
48
|
+
'apply_harmonic_distortion',
|
|
49
|
+
'apply_pedalboard_distortion',
|
|
50
|
+
'FreqMask',
|
|
51
|
+
'TimeMask',
|
|
52
|
+
'add_reverb',
|
|
53
|
+
'get_snr_use_vad',
|
|
54
|
+
'limiter',
|
|
55
|
+
'measure_loudness',
|
|
56
|
+
'snr_aug_Interpolation',
|
|
57
|
+
'snr_aug_changeClean',
|
|
58
|
+
'snr_aug_changeNoise',
|
|
59
|
+
'snr_aug_vad_Interpolation',
|
|
60
|
+
'snr_diff_changeClean',
|
|
61
|
+
'snr_diff_changeNoise',
|
|
62
|
+
'volume_aug',
|
|
63
|
+
'volume_aug_dbrms',
|
|
64
|
+
'volume_aug_linmax',
|
|
65
|
+
'volume_aug_lufs',
|
|
66
|
+
'volume_convert',
|
|
67
|
+
'volume_norm',
|
|
68
|
+
'clipping_aug',
|
|
69
|
+
'aac_aug_save',
|
|
70
|
+
'amr_nb_aug',
|
|
71
|
+
'amr_wb_aug',
|
|
72
|
+
'flac_aug',
|
|
73
|
+
'flac_encode_save',
|
|
74
|
+
'mp3_aug',
|
|
75
|
+
'opus_aug_save',
|
|
76
|
+
'vorbis_aug',
|
|
77
|
+
'apply_codec_distortion',
|
|
78
|
+
'check_codec_available',
|
|
79
|
+
'simulate_packet_loss_vectorized',
|
|
80
|
+
'apply_mulaw_quantization',
|
|
81
|
+
'apply_uniform_quantization',
|
|
82
|
+
]
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# This file is auto-generated. Do NOT edit manually.
|
|
2
2
|
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .dataset_analyzer import AudioFileInfo, DatasetAnalyzer, analyze_audio_dataset
|
|
9
|
+
from .quality_metrics import QualityAnalyzer, audio_health_check, comprehensive_quality_assessment
|
|
10
|
+
from .rms_distrubution import get_rms_vad
|
|
11
|
+
from .spectral_analysis import SpectralAnalyzer, compute_spectral_features, frequency_domain_stats
|
|
12
|
+
from .statistics import AudioStatistics, compare_datasets, quick_audio_stats
|
|
13
|
+
from .temporal_features import dB, dc_offset, max_rms_amplitude, mean_rms_amplitude, min_rms_amplitude, peak_amplitude, rms_amplitude, short_time_energy, zero_crossing_rate
|
|
14
|
+
from .visualization import AudioVisualizer, create_analysis_dashboard, plot_dataset_overview
|
|
15
|
+
|
|
16
|
+
# 运行时使用懒加载
|
|
3
17
|
from lazy_loader import attach
|
|
4
18
|
|
|
5
19
|
__getattr__, __dir__, __all__ = attach(
|
|
@@ -23,3 +37,33 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
23
37
|
"visualization": ['AudioVisualizer', 'create_analysis_dashboard', 'plot_dataset_overview'],
|
|
24
38
|
}
|
|
25
39
|
)
|
|
40
|
+
|
|
41
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
42
|
+
if TYPE_CHECKING:
|
|
43
|
+
__all__ = [
|
|
44
|
+
'AudioFileInfo',
|
|
45
|
+
'DatasetAnalyzer',
|
|
46
|
+
'analyze_audio_dataset',
|
|
47
|
+
'QualityAnalyzer',
|
|
48
|
+
'audio_health_check',
|
|
49
|
+
'comprehensive_quality_assessment',
|
|
50
|
+
'get_rms_vad',
|
|
51
|
+
'SpectralAnalyzer',
|
|
52
|
+
'compute_spectral_features',
|
|
53
|
+
'frequency_domain_stats',
|
|
54
|
+
'AudioStatistics',
|
|
55
|
+
'compare_datasets',
|
|
56
|
+
'quick_audio_stats',
|
|
57
|
+
'dB',
|
|
58
|
+
'dc_offset',
|
|
59
|
+
'max_rms_amplitude',
|
|
60
|
+
'mean_rms_amplitude',
|
|
61
|
+
'min_rms_amplitude',
|
|
62
|
+
'peak_amplitude',
|
|
63
|
+
'rms_amplitude',
|
|
64
|
+
'short_time_energy',
|
|
65
|
+
'zero_crossing_rate',
|
|
66
|
+
'AudioVisualizer',
|
|
67
|
+
'create_analysis_dashboard',
|
|
68
|
+
'plot_dataset_overview',
|
|
69
|
+
]
|
neverlib/filter/__init__.py
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# This file is auto-generated. Do NOT edit manually.
|
|
2
2
|
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .biquad import BiquadFilter
|
|
9
|
+
from .common import HPFilter, HPFilter_torch, LPFilter
|
|
10
|
+
from .core import EQFilter, EQ_test, eq_process, eq_process_test
|
|
11
|
+
|
|
12
|
+
# 运行时使用懒加载
|
|
3
13
|
from lazy_loader import attach
|
|
4
14
|
|
|
5
15
|
__getattr__, __dir__, __all__ = attach(
|
|
@@ -15,3 +25,16 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
15
25
|
"core": ['EQFilter', 'EQ_test', 'eq_process', 'eq_process_test'],
|
|
16
26
|
}
|
|
17
27
|
)
|
|
28
|
+
|
|
29
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
30
|
+
if TYPE_CHECKING:
|
|
31
|
+
__all__ = [
|
|
32
|
+
'BiquadFilter',
|
|
33
|
+
'HPFilter',
|
|
34
|
+
'HPFilter_torch',
|
|
35
|
+
'LPFilter',
|
|
36
|
+
'EQFilter',
|
|
37
|
+
'EQ_test',
|
|
38
|
+
'eq_process',
|
|
39
|
+
'eq_process_test',
|
|
40
|
+
]
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# This file is auto-generated. Do NOT edit manually.
|
|
2
2
|
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .de_eq import get_filter_function, match_frequency_response, plot_spectra_comparison
|
|
9
|
+
from .freq_eq import get_freq_eq
|
|
10
|
+
from .ga_eq_advanced import EQConfig, EQOptimizer, load_config_from_yaml, main
|
|
11
|
+
from .ga_eq_basic import custom_mutate, evaluate_individual, generate_active_gene, generate_dbgain_gene, generate_fc_gene, generate_q_gene, generate_type_gene, get_combined_eq_response_db, get_magnitude_spectrum_db, get_single_filter_freq_response_db_from_coeffs, individual_creator, main_ga
|
|
12
|
+
|
|
13
|
+
# 运行时使用懒加载
|
|
3
14
|
from lazy_loader import attach
|
|
4
15
|
|
|
5
16
|
__getattr__, __dir__, __all__ = attach(
|
|
@@ -17,3 +28,28 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
17
28
|
"ga_eq_basic": ['custom_mutate', 'evaluate_individual', 'generate_active_gene', 'generate_dbgain_gene', 'generate_fc_gene', 'generate_q_gene', 'generate_type_gene', 'get_combined_eq_response_db', 'get_magnitude_spectrum_db', 'get_single_filter_freq_response_db_from_coeffs', 'individual_creator', 'main_ga'],
|
|
18
29
|
}
|
|
19
30
|
)
|
|
31
|
+
|
|
32
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
33
|
+
if TYPE_CHECKING:
|
|
34
|
+
__all__ = [
|
|
35
|
+
'get_filter_function',
|
|
36
|
+
'match_frequency_response',
|
|
37
|
+
'plot_spectra_comparison',
|
|
38
|
+
'get_freq_eq',
|
|
39
|
+
'EQConfig',
|
|
40
|
+
'EQOptimizer',
|
|
41
|
+
'load_config_from_yaml',
|
|
42
|
+
'main',
|
|
43
|
+
'custom_mutate',
|
|
44
|
+
'evaluate_individual',
|
|
45
|
+
'generate_active_gene',
|
|
46
|
+
'generate_dbgain_gene',
|
|
47
|
+
'generate_fc_gene',
|
|
48
|
+
'generate_q_gene',
|
|
49
|
+
'generate_type_gene',
|
|
50
|
+
'get_combined_eq_response_db',
|
|
51
|
+
'get_magnitude_spectrum_db',
|
|
52
|
+
'get_single_filter_freq_response_db_from_coeffs',
|
|
53
|
+
'individual_creator',
|
|
54
|
+
'main_ga',
|
|
55
|
+
]
|
neverlib/metrics/__init__.py
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# This file is auto-generated. Do NOT edit manually.
|
|
2
2
|
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .dnsmos import ComputeScore
|
|
9
|
+
from .lpc_lsp import framing, lpc_lsp_distance, lpc_to_lsp
|
|
10
|
+
from .snr import get_snr, get_snr_from_noisy, psnr, seg_snr, si_sdr
|
|
11
|
+
from .spec import lsd, mcd, sd
|
|
12
|
+
from .test_pesq import mos2pesq, pesq2mos
|
|
13
|
+
from .time import dc_offset, mean_rms_amplitude, peak_amplitude, rms_amplitude
|
|
14
|
+
|
|
15
|
+
# 运行时使用懒加载
|
|
3
16
|
from lazy_loader import attach
|
|
4
17
|
|
|
5
18
|
__getattr__, __dir__, __all__ = attach(
|
|
@@ -13,7 +26,7 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
13
26
|
"time",
|
|
14
27
|
],
|
|
15
28
|
submod_attrs={
|
|
16
|
-
"dnsmos": ['ComputeScore'
|
|
29
|
+
"dnsmos": ['ComputeScore'],
|
|
17
30
|
"lpc_lsp": ['framing', 'lpc_lsp_distance', 'lpc_to_lsp'],
|
|
18
31
|
"snr": ['get_snr', 'get_snr_from_noisy', 'psnr', 'seg_snr', 'si_sdr'],
|
|
19
32
|
"spec": ['lsd', 'mcd', 'sd'],
|
|
@@ -21,3 +34,26 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
21
34
|
"time": ['dc_offset', 'mean_rms_amplitude', 'peak_amplitude', 'rms_amplitude'],
|
|
22
35
|
}
|
|
23
36
|
)
|
|
37
|
+
|
|
38
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
39
|
+
if TYPE_CHECKING:
|
|
40
|
+
__all__ = [
|
|
41
|
+
'ComputeScore',
|
|
42
|
+
'framing',
|
|
43
|
+
'lpc_lsp_distance',
|
|
44
|
+
'lpc_to_lsp',
|
|
45
|
+
'get_snr',
|
|
46
|
+
'get_snr_from_noisy',
|
|
47
|
+
'psnr',
|
|
48
|
+
'seg_snr',
|
|
49
|
+
'si_sdr',
|
|
50
|
+
'lsd',
|
|
51
|
+
'mcd',
|
|
52
|
+
'sd',
|
|
53
|
+
'mos2pesq',
|
|
54
|
+
'pesq2mos',
|
|
55
|
+
'dc_offset',
|
|
56
|
+
'mean_rms_amplitude',
|
|
57
|
+
'peak_amplitude',
|
|
58
|
+
'rms_amplitude',
|
|
59
|
+
]
|
neverlib/tests/__init__.py
CHANGED
|
@@ -1 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This file is auto-generated. Do NOT edit manually.
|
|
2
|
+
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .test_preprocess import test_NS_shape, test_pre_emphasis
|
|
9
|
+
from .test_vad import test_vad2nad
|
|
10
|
+
|
|
11
|
+
# 运行时使用懒加载
|
|
12
|
+
from lazy_loader import attach
|
|
13
|
+
|
|
14
|
+
__getattr__, __dir__, __all__ = attach(
|
|
15
|
+
__name__,
|
|
16
|
+
submodules=[
|
|
17
|
+
"test_imports",
|
|
18
|
+
"test_preprocess",
|
|
19
|
+
"test_vad",
|
|
20
|
+
],
|
|
21
|
+
submod_attrs={
|
|
22
|
+
"test_preprocess": ['test_NS_shape', 'test_pre_emphasis'],
|
|
23
|
+
"test_vad": ['test_vad2nad'],
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
28
|
+
if TYPE_CHECKING:
|
|
29
|
+
__all__ = [
|
|
30
|
+
'test_NS_shape',
|
|
31
|
+
'test_pre_emphasis',
|
|
32
|
+
'test_vad2nad',
|
|
33
|
+
]
|
neverlib/tests/test_imports.py
CHANGED
|
@@ -8,6 +8,8 @@ Description: 测试neverlib导入功能
|
|
|
8
8
|
import sys
|
|
9
9
|
import os
|
|
10
10
|
import time
|
|
11
|
+
from neverlib.utils import get_path_list
|
|
12
|
+
from neverlib.data_analyze.dataset_analyzer import AudioFileInfo
|
|
11
13
|
|
|
12
14
|
# 确保当前目录在Python路径中,以便导入neverlib
|
|
13
15
|
# sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
neverlib/utils/__init__.py
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# This file is auto-generated. Do NOT edit manually.
|
|
2
2
|
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .audio_split import audio_split_VADfunasr, audio_split_VADsilero, audio_split_ffmpeg, audio_split_np, audio_split_pydub, audio_split_random, audio_split_sox
|
|
9
|
+
from .checkGPU import get_gpu_utilization, is_gpu_idle, monitor_gpu_utilization
|
|
10
|
+
from .lazy_expose import attach_and_expose_all
|
|
11
|
+
from .lazy_module import LazyModule
|
|
12
|
+
from .message import send_QQEmail, send_QQEmail_with_images
|
|
13
|
+
from .utils import DatasetSubfloderSplit, TrainValSplit, TrainValTestSplit, del_empty_folders, get_audio_segments, get_file_time, \
|
|
14
|
+
get_leaf_folders, get_path_list, pcm2wav, read_pcm, rename_files_and_folders, save_weight_histogram, wav2pcm, EPS
|
|
15
|
+
|
|
16
|
+
# 运行时使用懒加载
|
|
3
17
|
from lazy_loader import attach
|
|
4
18
|
|
|
5
19
|
__getattr__, __dir__, __all__ = attach(
|
|
@@ -13,14 +27,45 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
13
27
|
"utils",
|
|
14
28
|
],
|
|
15
29
|
submod_attrs={
|
|
16
|
-
"audio_split": ['audio_split_VADfunasr', 'audio_split_VADsilero', 'audio_split_ffmpeg',
|
|
17
|
-
'audio_split_np', 'audio_split_pydub', 'audio_split_random', 'audio_split_sox'],
|
|
30
|
+
"audio_split": ['audio_split_VADfunasr', 'audio_split_VADsilero', 'audio_split_ffmpeg', 'audio_split_np', 'audio_split_pydub', 'audio_split_random', 'audio_split_sox'],
|
|
18
31
|
"checkGPU": ['get_gpu_utilization', 'is_gpu_idle', 'monitor_gpu_utilization'],
|
|
19
32
|
"lazy_expose": ['attach_and_expose_all'],
|
|
20
33
|
"lazy_module": ['LazyModule'],
|
|
21
34
|
"message": ['send_QQEmail', 'send_QQEmail_with_images'],
|
|
22
|
-
"utils": ['
|
|
23
|
-
'
|
|
24
|
-
'rename_files_and_folders', 'save_weight_histogram', 'wav2pcm'],
|
|
35
|
+
"utils": ['DatasetSubfloderSplit', 'TrainValSplit', 'TrainValTestSplit', 'del_empty_folders', 'get_audio_segments', 'get_file_time', 'get_leaf_folders',
|
|
36
|
+
'get_path_list', 'pcm2wav', 'read_pcm', 'rename_files_and_folders', 'save_weight_histogram', 'wav2pcm', "EPS"],
|
|
25
37
|
}
|
|
26
38
|
)
|
|
39
|
+
|
|
40
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
41
|
+
if TYPE_CHECKING:
|
|
42
|
+
__all__ = [
|
|
43
|
+
'audio_split_VADfunasr',
|
|
44
|
+
'audio_split_VADsilero',
|
|
45
|
+
'audio_split_ffmpeg',
|
|
46
|
+
'audio_split_np',
|
|
47
|
+
'audio_split_pydub',
|
|
48
|
+
'audio_split_random',
|
|
49
|
+
'audio_split_sox',
|
|
50
|
+
'get_gpu_utilization',
|
|
51
|
+
'is_gpu_idle',
|
|
52
|
+
'monitor_gpu_utilization',
|
|
53
|
+
'attach_and_expose_all',
|
|
54
|
+
'LazyModule',
|
|
55
|
+
'send_QQEmail',
|
|
56
|
+
'send_QQEmail_with_images',
|
|
57
|
+
'DatasetSubfloderSplit',
|
|
58
|
+
'TrainValSplit',
|
|
59
|
+
'TrainValTestSplit',
|
|
60
|
+
'del_empty_folders',
|
|
61
|
+
'get_audio_segments',
|
|
62
|
+
'get_file_time',
|
|
63
|
+
'get_leaf_folders',
|
|
64
|
+
'get_path_list',
|
|
65
|
+
'pcm2wav',
|
|
66
|
+
'read_pcm',
|
|
67
|
+
'rename_files_and_folders',
|
|
68
|
+
'save_weight_histogram',
|
|
69
|
+
'wav2pcm',
|
|
70
|
+
'EPS',
|
|
71
|
+
]
|
neverlib/utils/audio_split.py
CHANGED
|
@@ -53,6 +53,7 @@ def audio_split_sox(source_path, target_path, duration, endwith="*.wav"):
|
|
|
53
53
|
:param duration: 分割为时长(短音频)(单位:秒)
|
|
54
54
|
:param endwith: 音频格式(只支持wav)
|
|
55
55
|
"""
|
|
56
|
+
assert endwith == "*.wav", "只支持wav格式的音频"
|
|
56
57
|
wav_path_list = get_path_list(source_path, end=endwith)
|
|
57
58
|
|
|
58
59
|
for wav_path in wav_path_list:
|
neverlib/utils/utils.py
CHANGED
|
@@ -385,3 +385,18 @@ def save_weight_histogram(model,
|
|
|
385
385
|
plt.hist(buffer, bins=bins)
|
|
386
386
|
plt.savefig(os.path.join(save_dir, "buffer", f"{name}.png"))
|
|
387
387
|
plt.close()
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
def read_pcm(file_path, channels=5, sample_rate=16000, sample_width=2):
|
|
391
|
+
# Read raw binary data from the PCM file
|
|
392
|
+
with open(file_path, 'rb') as f:
|
|
393
|
+
raw_data = f.read()
|
|
394
|
+
|
|
395
|
+
# Convert binary data to numpy array of the correct dtype
|
|
396
|
+
audio_data = np.frombuffer(raw_data, dtype=np.int16)
|
|
397
|
+
|
|
398
|
+
# Reshape the data into a 2D array with shape (num_frames, channels)
|
|
399
|
+
num_frames = len(audio_data) // channels
|
|
400
|
+
audio_data = audio_data.reshape((num_frames, channels))
|
|
401
|
+
|
|
402
|
+
return audio_data
|
neverlib/vad/PreProcess.py
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
'''
|
|
2
|
-
Author: 凌逆战 | Never
|
|
3
|
-
Date: 2025-02-13 20:06:07
|
|
4
|
-
LastEditTime: 2025-08-16 02:07:24
|
|
5
|
-
FilePath:
|
|
6
|
-
Description:
|
|
7
|
-
'''
|
|
8
|
-
# -*- coding:utf-8 -*-
|
|
9
|
-
# Author:凌逆战 | Never
|
|
10
|
-
# Date: 2024/9/14
|
|
11
|
-
"""
|
|
12
|
-
通过一些预处理方法, 来提高VAD的准确率
|
|
13
|
-
"""
|
|
14
|
-
import numpy as np
|
|
15
|
-
import noisereduce as nr
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def pre_emphasis(audio_data, alpha=0.97):
|
|
19
|
-
"""
|
|
20
|
-
预加重
|
|
21
|
-
"""
|
|
22
|
-
# y(n)=x(n)−α⋅x(n−1)
|
|
23
|
-
emphasized_audio = np.append(audio_data[0], audio_data[1:] - alpha * audio_data[:-1])
|
|
24
|
-
return emphasized_audio
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def NS(wav, sr=16000, stationary=True, prop_decrease=1.):
|
|
28
|
-
""" 传统降噪 Doc: https://pypi.org/project/noisereduce/
|
|
29
|
-
:param wav: (xxx,) or (channels, xxx)
|
|
30
|
-
:param sr: 采样率
|
|
31
|
-
:param stationary: 平稳降噪还是非平稳降噪
|
|
32
|
-
:param prop_decrease: 0~1, 降噪噪声百分比
|
|
33
|
-
:return:
|
|
34
|
-
"""
|
|
35
|
-
if stationary:
|
|
36
|
-
# 平稳噪声抑制 stationary=True
|
|
37
|
-
reduced_noise = nr.reduce_noise(y=wav, sr=sr, stationary=True,
|
|
38
|
-
prop_decrease=prop_decrease, # 降噪噪声的比例
|
|
39
|
-
)
|
|
40
|
-
else:
|
|
41
|
-
# 非平稳噪声抑制 stationary=False
|
|
42
|
-
reduced_noise = nr.reduce_noise(y=wav, sr=sr, stationary=False,
|
|
43
|
-
prop_decrease=prop_decrease,
|
|
44
|
-
)
|
|
45
|
-
return reduced_noise
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def NS_test():
|
|
49
|
-
import soundfile as sf
|
|
50
|
-
sr = 16000
|
|
51
|
-
wav_path = "../../data/vad_example.wav"
|
|
52
|
-
wav, wav_sr = sf.read(wav_path, always_2d=False, dtype="float32")
|
|
53
|
-
wav_NS = NS(wav, sr=sr, stationary=True, prop_decrease=0.6)
|
|
54
|
-
sf.write("../../wav_data/000_short_NS.wav", wav_NS, samplerate=sr)
|
|
55
|
-
|
|
56
|
-
# 绘制降噪后的频谱图
|
|
57
|
-
import matplotlib.pyplot as plt
|
|
58
|
-
plt.subplot(211)
|
|
59
|
-
plt.specgram(wav, Fs=sr, scale_by_freq=True, sides='default', cmap="jet")
|
|
60
|
-
plt.subplot(212)
|
|
61
|
-
plt.specgram(wav_NS, Fs=sr, scale_by_freq=True, sides='default', cmap="jet")
|
|
62
|
-
plt.show()
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if __name__ == "__main__":
|
|
66
|
-
NS_test()
|
|
1
|
+
'''
|
|
2
|
+
Author: 凌逆战 | Never
|
|
3
|
+
Date: 2025-02-13 20:06:07
|
|
4
|
+
LastEditTime: 2025-08-16 02:07:24
|
|
5
|
+
FilePath: \\neverlib\\vad\\PreProcess.py
|
|
6
|
+
Description:
|
|
7
|
+
'''
|
|
8
|
+
# -*- coding:utf-8 -*-
|
|
9
|
+
# Author:凌逆战 | Never
|
|
10
|
+
# Date: 2024/9/14
|
|
11
|
+
"""
|
|
12
|
+
通过一些预处理方法, 来提高VAD的准确率
|
|
13
|
+
"""
|
|
14
|
+
import numpy as np
|
|
15
|
+
import noisereduce as nr
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def pre_emphasis(audio_data, alpha=0.97):
|
|
19
|
+
"""
|
|
20
|
+
预加重
|
|
21
|
+
"""
|
|
22
|
+
# y(n)=x(n)−α⋅x(n−1)
|
|
23
|
+
emphasized_audio = np.append(audio_data[0], audio_data[1:] - alpha * audio_data[:-1])
|
|
24
|
+
return emphasized_audio
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def NS(wav, sr=16000, stationary=True, prop_decrease=1.):
|
|
28
|
+
""" 传统降噪 Doc: https://pypi.org/project/noisereduce/
|
|
29
|
+
:param wav: (xxx,) or (channels, xxx)
|
|
30
|
+
:param sr: 采样率
|
|
31
|
+
:param stationary: 平稳降噪还是非平稳降噪
|
|
32
|
+
:param prop_decrease: 0~1, 降噪噪声百分比
|
|
33
|
+
:return:
|
|
34
|
+
"""
|
|
35
|
+
if stationary:
|
|
36
|
+
# 平稳噪声抑制 stationary=True
|
|
37
|
+
reduced_noise = nr.reduce_noise(y=wav, sr=sr, stationary=True,
|
|
38
|
+
prop_decrease=prop_decrease, # 降噪噪声的比例
|
|
39
|
+
)
|
|
40
|
+
else:
|
|
41
|
+
# 非平稳噪声抑制 stationary=False
|
|
42
|
+
reduced_noise = nr.reduce_noise(y=wav, sr=sr, stationary=False,
|
|
43
|
+
prop_decrease=prop_decrease,
|
|
44
|
+
)
|
|
45
|
+
return reduced_noise
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def NS_test():
|
|
49
|
+
import soundfile as sf
|
|
50
|
+
sr = 16000
|
|
51
|
+
wav_path = "../../data/vad_example.wav"
|
|
52
|
+
wav, wav_sr = sf.read(wav_path, always_2d=False, dtype="float32")
|
|
53
|
+
wav_NS = NS(wav, sr=sr, stationary=True, prop_decrease=0.6)
|
|
54
|
+
sf.write("../../wav_data/000_short_NS.wav", wav_NS, samplerate=sr)
|
|
55
|
+
|
|
56
|
+
# 绘制降噪后的频谱图
|
|
57
|
+
import matplotlib.pyplot as plt
|
|
58
|
+
plt.subplot(211)
|
|
59
|
+
plt.specgram(wav, Fs=sr, scale_by_freq=True, sides='default', cmap="jet")
|
|
60
|
+
plt.subplot(212)
|
|
61
|
+
plt.specgram(wav_NS, Fs=sr, scale_by_freq=True, sides='default', cmap="jet")
|
|
62
|
+
plt.show()
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if __name__ == "__main__":
|
|
66
|
+
NS_test()
|
neverlib/vad/__init__.py
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# This file is auto-generated. Do NOT edit manually.
|
|
2
2
|
# Generated by neverlib.QA.gen_init
|
|
3
|
+
|
|
4
|
+
from typing import TYPE_CHECKING, Any
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
# 仅在类型检查时导入,提供IDE补全支持
|
|
8
|
+
from .PreProcess import NS, NS_test, pre_emphasis
|
|
9
|
+
from .VAD_Energy import EnergyVad_C
|
|
10
|
+
from .VAD_Silero import Silero_VAD_C
|
|
11
|
+
from .VAD_WebRTC import WebRTC_VAD_C
|
|
12
|
+
from .VAD_funasr import FunASR_VAD_C
|
|
13
|
+
from .VAD_statistics import Statistics_VAD
|
|
14
|
+
from .VAD_vadlib import Vadlib_C
|
|
15
|
+
from .VAD_whisper import Whisper_VAD_C
|
|
16
|
+
from .class_get_speech import getSpeech
|
|
17
|
+
from .class_vad import VADClass
|
|
18
|
+
from .utils import from_vadArray_to_vadEndpoint, vad2nad, vad_smooth
|
|
19
|
+
|
|
20
|
+
# 运行时使用懒加载
|
|
3
21
|
from lazy_loader import attach
|
|
4
22
|
|
|
5
23
|
__getattr__, __dir__, __all__ = attach(
|
|
@@ -31,3 +49,23 @@ __getattr__, __dir__, __all__ = attach(
|
|
|
31
49
|
"utils": ['from_vadArray_to_vadEndpoint', 'vad2nad', 'vad_smooth'],
|
|
32
50
|
}
|
|
33
51
|
)
|
|
52
|
+
|
|
53
|
+
# 显式声明 __all__ 以便 IDE 识别
|
|
54
|
+
if TYPE_CHECKING:
|
|
55
|
+
__all__ = [
|
|
56
|
+
'NS',
|
|
57
|
+
'NS_test',
|
|
58
|
+
'pre_emphasis',
|
|
59
|
+
'EnergyVad_C',
|
|
60
|
+
'Silero_VAD_C',
|
|
61
|
+
'WebRTC_VAD_C',
|
|
62
|
+
'FunASR_VAD_C',
|
|
63
|
+
'Statistics_VAD',
|
|
64
|
+
'Vadlib_C',
|
|
65
|
+
'Whisper_VAD_C',
|
|
66
|
+
'getSpeech',
|
|
67
|
+
'VADClass',
|
|
68
|
+
'from_vadArray_to_vadEndpoint',
|
|
69
|
+
'vad2nad',
|
|
70
|
+
'vad_smooth',
|
|
71
|
+
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
neverlib/__init__.py,sha256=
|
|
1
|
+
neverlib/__init__.py,sha256=Kq_ZWgw8gFiqQIN2gPzXkgti_zXUi2DYx0CD-88ExZU,2048
|
|
2
2
|
neverlib/.claude/settings.local.json,sha256=nBol-eXbiZ3FMr1a7e6ls6CO9nwz5f3quPjEQzMkTyQ,126
|
|
3
3
|
neverlib/.history/__init___20250805234212.py,sha256=RuVTeJiZfStZ12eMlEfTZ8ZjiC5RBaIQFht-bzMWdTs,1158
|
|
4
4
|
neverlib/.history/__init___20250904102635.py,sha256=7G8jWnR8puUua7yvH63_AKM6rWGq0IvwgrincgrEs58,1081
|
|
@@ -417,13 +417,13 @@ neverlib/Docs/vad/VAD_statistics.ipynb,sha256=wT0k_91YUpLLIt6LZMKrjvJLk4kz8g-fZd
|
|
|
417
417
|
neverlib/Docs/vad/VAD_tenVAD.ipynb,sha256=w8oOBVeabW44Fw7TF6CSxIqa3u1gGydoMuWSxE7slaA,351893
|
|
418
418
|
neverlib/Docs/vad/VAD_vadlib.ipynb,sha256=m55oKqOGeMOSgmQlbMkOR6zVh5_Hn6SIocHi6mOtg1k,300998
|
|
419
419
|
neverlib/Docs/vad/VAD_whisper.ipynb,sha256=P78NqxCfwbbEJYQsqA1NV8vpxQxWNxy2lDX85zO_yD4,364207
|
|
420
|
-
neverlib/QA/gen_init.py,sha256=
|
|
420
|
+
neverlib/QA/gen_init.py,sha256=9QysSB2vk1OR9FmuuKcFtShtiJeCTnvvg6RBlxOUcQU,8127
|
|
421
421
|
neverlib/QA/get_fun.py,sha256=-UP2FOm3jB_138ntpbsW0eG1S0tJ0d90NqI6f95ryYg,541
|
|
422
422
|
neverlib/QA/html2markdown.py,sha256=ZiXvpwcJ_QBhIR6aetaMOmktWHtd_F7Ed07Deo3qM4c,669
|
|
423
423
|
neverlib/audio_aug/HarmonicDistortion.py,sha256=MqbfcdWJLtl_WGloQYDa6fIB6QCgukYdjoxsj8X03kk,2706
|
|
424
424
|
neverlib/audio_aug/TFDrop.py,sha256=HDLf5qfqMT73-dxKder0v0AT7b0FYsSlexbbh3sL2iM,987
|
|
425
425
|
neverlib/audio_aug/TFMask.py,sha256=Fakx5YTj88bZEdj_w3aH9Z9AhEGzGq01TZcnjF4v4BU,1769
|
|
426
|
-
neverlib/audio_aug/__init__.py,sha256=
|
|
426
|
+
neverlib/audio_aug/__init__.py,sha256=5mBg5p8aDHvOPlRSmR-ojGhtxaJTFCmCZUltaj2RPAs,3313
|
|
427
427
|
neverlib/audio_aug/audio_aug.py,sha256=5Eqtx_v2RLtNEwh1gTyfqSHBirwz1JCgDrjgt4WYBlY,16674
|
|
428
428
|
neverlib/audio_aug/clip_aug.py,sha256=xZi89AtdOgUpX7W4x4_UiZFeK-oCWktueoWSEAY19hU,1041
|
|
429
429
|
neverlib/audio_aug/coder_aug.py,sha256=1JtNadfUVbOw8Xg3vpp0cTl87HHuDedHZ3zbUZ2fWW0,8347
|
|
@@ -438,7 +438,7 @@ neverlib/data/white.wav,sha256=JJ3aaPx8v7WakYU7U--m0kO1qUkDSMOrOrPKi6RqAA0,32508
|
|
|
438
438
|
neverlib/data/white_EQ.wav,sha256=UN1W0hH_4JInnye9vIsQlagVXM-rnJPd1j7A_RIia8c,325086
|
|
439
439
|
neverlib/data/white_matched.wav,sha256=h9vD-2q1eKw9s8pVUoIeXXjeKEC-VRiNABCY-CYcUQ0,115514
|
|
440
440
|
neverlib/data_analyze/README.md,sha256=jqPmD--kinoTqlcpu51teospu9p_ijjtjLdFGTMnBc8,6051
|
|
441
|
-
neverlib/data_analyze/__init__.py,sha256=
|
|
441
|
+
neverlib/data_analyze/__init__.py,sha256=3Gl_o2s9OYmy1r7UZLxKZGwwOXJYuQ__F1RM578lvAI,2781
|
|
442
442
|
neverlib/data_analyze/dataset_analyzer.py,sha256=JawpMrahP2YD9mX6kIGJrBRtC7sqYJJdY1R5pGBUDDY,21902
|
|
443
443
|
neverlib/data_analyze/quality_metrics.py,sha256=wOivyQ4JXdyiq1STLCSdBDtoW8Kju-Zc1RZMyPNmNjY,11726
|
|
444
444
|
neverlib/data_analyze/rms_distrubution.py,sha256=EpK9s7WJLtJHXd1xD8SvuiyPVTguouYVHyS7Lha2Qag,1526
|
|
@@ -447,17 +447,17 @@ neverlib/data_analyze/statistics.py,sha256=9b9S_7eBoklNfz9cRAs8oWlRnDSjuark4SwTr
|
|
|
447
447
|
neverlib/data_analyze/temporal_features.py,sha256=qrxA0Uh-DxRPbuILQle66AAgv4SgwiLoPTIR9Q2_Jz4,3065
|
|
448
448
|
neverlib/data_analyze/visualization.py,sha256=kaJBfh1ixlGeVfr4yNRfZlzTvfhbdnIW4LOhbGqwYKM,16439
|
|
449
449
|
neverlib/filter/README.md,sha256=X1VQRnSxzjkeR_16ylbAqRbYLAlf4c5stkHzmWlCzlo,3801
|
|
450
|
-
neverlib/filter/__init__.py,sha256=
|
|
450
|
+
neverlib/filter/__init__.py,sha256=oQJLBqxGpC1T-DmHbcSceY9Ir31VXqknzoRNQRAGChI,1019
|
|
451
451
|
neverlib/filter/biquad.py,sha256=EEGAqGwTQGG5O49Q855hb475WVX0oOu3zq-Gn_ppIto,1438
|
|
452
452
|
neverlib/filter/common.py,sha256=9FD3VKwRpe_IdQujt2AJjlMJ_WR-YNEY8OmhOQUDDO8,1953
|
|
453
453
|
neverlib/filter/core.py,sha256=qr-0IGEEpiSUFgo_uVOXJLLZeaSDFlALzg_b8mEivrY,13091
|
|
454
454
|
neverlib/filter/auto_eq/README.md,sha256=-qcqLxIQPo31YfzABHK-_tcqksLdOTHz8ZG3izz46Ug,4968
|
|
455
|
-
neverlib/filter/auto_eq/__init__.py,sha256=
|
|
455
|
+
neverlib/filter/auto_eq/__init__.py,sha256=RWgAXvBWBDboBxzlPBQJWwQLPctniIAZBXZRQAC_QFw,2190
|
|
456
456
|
neverlib/filter/auto_eq/de_eq.py,sha256=XlbFWDPOdGHI97fbU9wXd4h3Aiosv1T5k_e-VEUcDMQ,16411
|
|
457
457
|
neverlib/filter/auto_eq/freq_eq.py,sha256=1b5hnoqUy1zxVd2WSNqhpokAgJo0xTRwR5AyVPaMr3E,3494
|
|
458
458
|
neverlib/filter/auto_eq/ga_eq_advanced.py,sha256=qu9J5ugWeEAcXboV9Fv1g60bMOkIebw9ZwYT_zQq5pI,23458
|
|
459
459
|
neverlib/filter/auto_eq/ga_eq_basic.py,sha256=gbPqJcimrThzhCjgWkg4DuWpeswRRqxNKMC4I07rp6g,15431
|
|
460
|
-
neverlib/metrics/__init__.py,sha256=
|
|
460
|
+
neverlib/metrics/__init__.py,sha256=NCE7SOoA2UXu4aVmiF0oWvvdS9RaqR9tSY7PZjzDNew,1628
|
|
461
461
|
neverlib/metrics/dnsmos.py,sha256=xfrKxYR9mMDkr2HQ7AT_7V-TtdRpy2MybjsJ2AuLXus,4590
|
|
462
462
|
neverlib/metrics/lpc_lsp.py,sha256=OXKfillGKo55M2aa7LzyvDGcjtOxdOJquWgqC1yV4Ho,3710
|
|
463
463
|
neverlib/metrics/snr.py,sha256=l8cYOUuEYeKc5LzQ3q5n4-wql3PcuJfEYcsjBAEQt5w,6360
|
|
@@ -478,18 +478,18 @@ neverlib/metrics/pesq_c/pesqio.c,sha256=S8PLwBfx0oHHVLfZ1jUsGbwwMniFhHNNV8X6bcUx
|
|
|
478
478
|
neverlib/metrics/pesq_c/pesqmain.c,sha256=NaANjEDJrCFwJBbXErX51ZKtE86SHKdrXLhS0P3TbT0,27322
|
|
479
479
|
neverlib/metrics/pesq_c/pesqmod.c,sha256=9stYhCLUShFAd6Zc85nQn57RUKDbS2Q8MrhQFB_-ySA,52999
|
|
480
480
|
neverlib/metrics/pesq_c/pesqpar.h,sha256=XZkwXcwycL8ekK6LQy_PT9Ih2K0zirSPHCMhGKyJExs,20986
|
|
481
|
-
neverlib/tests/__init__.py,sha256=
|
|
482
|
-
neverlib/tests/test_imports.py,sha256=
|
|
481
|
+
neverlib/tests/__init__.py,sha256=kCV9FZWa7j9g_i6bqb-hEq7pvmWmDz2EMnGX15n7YmE,811
|
|
482
|
+
neverlib/tests/test_imports.py,sha256=3LGZaHZLAz2oJq2ewfRbnWNeAKikHih6d9CIdyqhb0E,547
|
|
483
483
|
neverlib/tests/test_preprocess.py,sha256=GHj2PvlG8chJlV-zpRfy8IYlTXzGkn5heO9ipy6Xe20,1003
|
|
484
484
|
neverlib/tests/test_vad.py,sha256=TjBuB_qPooflrjkkvoy19HySdBo-MiVeb5yTmLGBJvM,415
|
|
485
|
-
neverlib/utils/__init__.py,sha256=
|
|
486
|
-
neverlib/utils/audio_split.py,sha256=
|
|
485
|
+
neverlib/utils/__init__.py,sha256=A969zG3BBrSVtoZFsm60PolCaH0BI0PflUUubqfVT8M,2727
|
|
486
|
+
neverlib/utils/audio_split.py,sha256=tDWw36FXMIVOZ08PC9KQTYB3Zz_doFcP1ugYdpLkQjQ,12368
|
|
487
487
|
neverlib/utils/checkGPU.py,sha256=OkztJZJxncqSSIttxISpLSgfqa9xjXOaHIuMlRNwX-4,4393
|
|
488
488
|
neverlib/utils/lazy_expose.py,sha256=3h1LidRoab_ylv574-dOBjnJpOKWgLFgXpTWrvqce9E,1027
|
|
489
489
|
neverlib/utils/lazy_module.py,sha256=JdEdAYnbHmolB-hktrcuOlzR4Ee5jgu6V0XjDNqioVM,3995
|
|
490
490
|
neverlib/utils/message.py,sha256=XV7m0yUsR7Zq-olS-vL1oUEatSgh-Am8pyB_QPLzQok,4121
|
|
491
|
-
neverlib/utils/utils.py,sha256=
|
|
492
|
-
neverlib/vad/PreProcess.py,sha256=
|
|
491
|
+
neverlib/utils/utils.py,sha256=rsKSOuo__ISdmTe1AQhNqFD8ENHl8A60aDEoGUTiBlE,15179
|
|
492
|
+
neverlib/vad/PreProcess.py,sha256=oib4iRfsUXp5U67pKzJF8k53rqjo8NopK_9LW4O8Mqk,2045
|
|
493
493
|
neverlib/vad/README.md,sha256=3aFnGmz3uhg-kQVOGei40Ei3Lx5P71r2rk0Xl8-JZXI,1490
|
|
494
494
|
neverlib/vad/VAD_Energy.py,sha256=ErsiDxn4mH_EOiFBRcoBBRqTUsFfEsvEvRELrdZflkw,2135
|
|
495
495
|
neverlib/vad/VAD_Silero.py,sha256=L9_eO94VQcO3TBdOWypJxnjMl5ZZBYTkL5DR_6APfs4,2324
|
|
@@ -498,13 +498,13 @@ neverlib/vad/VAD_funasr.py,sha256=oJqU3VOFT-KXmFV2g8kvT64nHIo5-PxcB4tdb-Ap3Bw,15
|
|
|
498
498
|
neverlib/vad/VAD_statistics.py,sha256=o310LKoMECBHO6LcqU3vb-uirF6PM2fHbaRautT2w-w,16663
|
|
499
499
|
neverlib/vad/VAD_vadlib.py,sha256=5reZ7blu0BsqqO9WJn8YPIvPQVn8VcFPcJnH1scgEzQ,2228
|
|
500
500
|
neverlib/vad/VAD_whisper.py,sha256=GhBFV-EIS865c-rj2RvM4IUKKG8ZsoD9LCTwrx1Fx2c,1792
|
|
501
|
-
neverlib/vad/__init__.py,sha256=
|
|
501
|
+
neverlib/vad/__init__.py,sha256=UflLGnBIUyqIoIuGLThF4vHeKD6pPRMy3mRyXMiUCAk,2035
|
|
502
502
|
neverlib/vad/class_get_speech.py,sha256=s1n24I4P4aTFaQSiyXrh_xAmOChuFZ-wWgrYEE6eCHs,2074
|
|
503
503
|
neverlib/vad/class_vad.py,sha256=ao_20-vyzcI8CxEcvcA_-HoRPTiPEtfuKor2_YWEbz0,5212
|
|
504
504
|
neverlib/vad/img.png,sha256=eLlaUgDnJNyleWZwW8sNv3eXaeaGoXwhFUZCCDJh9u8,179778
|
|
505
505
|
neverlib/vad/utils.py,sha256=rEWEzGv2E_iTHIdQxY361iEW4Hq9MRDwkMBQMTA9mGw,3049
|
|
506
|
-
neverlib-0.2.
|
|
507
|
-
neverlib-0.2.
|
|
508
|
-
neverlib-0.2.
|
|
509
|
-
neverlib-0.2.
|
|
510
|
-
neverlib-0.2.
|
|
506
|
+
neverlib-0.2.8.dist-info/licenses/LICENSE,sha256=h-U7vhFdQhieyaNCiA_utrRNMk1rjfrBAUJVodgkfsw,1096
|
|
507
|
+
neverlib-0.2.8.dist-info/METADATA,sha256=8PeHX6no4CgyTvP8c44NjGA4mclVM_22uKbafKoJO9w,2811
|
|
508
|
+
neverlib-0.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
509
|
+
neverlib-0.2.8.dist-info/top_level.txt,sha256=QqwYFuDiY_iFTz0Kx8av6zKCP_s4M5NiMTNsIXOy8Po,9
|
|
510
|
+
neverlib-0.2.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|