audclas-0.0.6
توضیحات
Package that uses extracted audio classification model from neonbjb/DL-Art-School - for filtering fine audio files.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Microsoft :: Windows |
| نام فایل | audclas-0.0.6 |
| نام | audclas |
| نسخه کتابخانه | 0.0.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Shmart <szprytnyd@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/audclas/ |
| مجوز | - |
# AudClas
Package that uses audio classification model extracted from neonbjb/DL-Art-School - for filtering fine audio files.
# Classes
Classifier model returns one of 6 possible labels:
| label | class name |
| ----- | ---------- |
| 0 | fine |
| 1 | env_noise |
| 2 | music |
| 3 | two_voices |
| 4 | reverb |
| - | unknown |
# Installation
`pip install audclas`
# examples of usage
For single audio file:
```py
from audclas.tortoise_audio_classifier import TortoiseAudioClassifier
classifier = TortoiseAudioClassifier()
label = classifier('wavs/test.wav')
print(label)
```
For directory containing audio files (it searches recursively for all .wav / .mp3 files):
```py
from tqdm import tqdm
from audclas.tortoise_audio_classifier import TortoiseAudioClassifier
classifier = TortoiseAudioClassifier()
batch_size = 32
do_classify, total = classifier.prepare_classify_dir_job('/content/wavs', batch_size)
fine_audio_paths = []
for result in tqdm(do_classify(), total=total):
for audio_path, audio_label in result:
if audio_label == 'fine':
fine_audio_paths.append(audio_path)
print(f'directory contains {len(fine_audio_paths)} fine files (total files: {total * batch_size})')
```
نیازمندی
| مقدار | نام |
|---|---|
| - | huggingface-hub |
| - | librosa |
| - | numpy |
| - | scipy |
| - | torch |
| - | torchaudio |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl audclas-0.0.6:
pip install audclas-0.0.6.whl
نصب پکیج tar.gz audclas-0.0.6:
pip install audclas-0.0.6.tar.gz