Usage
1. Install
pip install dvtk
2. Run
Run dvtk to validate audio files in local directories.
dvtk \
--paths /path/to/directory/ \
--ext .wav \
--metrics dvtk.default_metrics:sr,duration,max_amplitude,dnsmos_speech \
--output dv_result.csv \
--parallel \
--max-workers 8
Run dvtk to validate audio files in S3 directories.
dvtk \
--paths s3://bucket-name/path/to/directory/ \
--ext .wav \
--metrics dvtk.default_metrics:sr,duration,max_amplitude,dnsmos_speech \
--output dv_result.csv \
--parallel \
--max-workers 8
Remarks
- You can specify multiple paths and extensions (e.g.,
--ext .wav .flac). - You can specify the AWS profile to use (
--aws-profile). - More default metrics are available in
dvtk.default_metrics(e.g., reference-free PESQ, reference-free SI-SDR for speech).
Using Custom Metrics
- Create a small python module (e.g.,
mymetrics.py) in your working directory:
# mymetrics.py
import numpy as np
def custom_metric(audio: np.ndarray, sr: int) -> float:
... # compute the custom metric
return metric # float
- Run the CLI:
dvtk \
--paths /path/to/directory/ \
--ext .wav \
--metrics dvtk.default_metrics:duration,max_amplitude,dnsmos_speech \
mymetrics:custom_metric \
--output dv_result.csv \
--parallel \
--max-workers 8
- Support more storage backends (e.g., Google Cloud Storage)
- On-disk caching or cehckpointing
- Progress bar
Metadata
Release files for dvtk 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dvtk-0.2.1.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dvtk-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.2 kB
Release files / dvtk-0.2.1.tar.gz
| Download URL | dvtk-0.2.1.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3326f4d69233f8e7975824a37ff6fc331a5c05551e2e7392f1e0aa33e9471a62
|
|
BLAKE2b-256 checksum How to use checksums |
b99e1d77cf159595cc6f6ebb8c773dbbc10c26387979440867911b94be469a35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|
Release files / dvtk-0.2.1-py3-none-any.whl
| Download URL | dvtk-0.2.1-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
835fac4c5dce180eee755578611bbe041c6d131b751e78b3ca267846bf47adcb
|
|
BLAKE2b-256 checksum How to use checksums |
322c4fad8e51c9971abc27773d50e043c4acf6f75453083db9f4b2ae1f4e26cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.16
|