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:
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):
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})')
Metadata
Release files for audclas 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| audclas-0.0.6.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| audclas-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.8 kB
Release files / audclas-0.0.6.tar.gz
| Download URL | audclas-0.0.6.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
127f63f0434a8b694487ea7065b3c1a88e174735a92d0f43f1edd1bd7e3fa16d
|
|
BLAKE2b-256 checksum How to use checksums |
ed15a32209db528e7625f89cc3919f7bd0cd2ad5a720cf22f0447aba383af3ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.9
|
Release files / audclas-0.0.6-py3-none-any.whl
| Download URL | audclas-0.0.6-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99c143b6a424d4bac6dcd578c73f9af0c59363de8d1346a71c394474a8514bf5
|
|
BLAKE2b-256 checksum How to use checksums |
5e6847e0524e02145c73dc1925478f9fc9b5c05b06f8cc70518043dba25c4103
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.9
|