CLI tool to extract audio files and metadata from Parquet datasets
Project description
vakya
CLI tool to extract audio files and metadata from Parquet datasets into a structured, portable format.
Installation
pip install vakya
Quick Start
-
Inspect a Parquet file to see its columns:
vakya schema data/train-00000.parquet
-
Validate your config (or use defaults):
vakya validate-config my_config.yaml
-
Extract everything:
vakya extract ./my_dataset --config my_config.yaml
Configuration (YAML)
All behavior is controlled via a YAML config file.
# vakya_config.yaml
# Column in the Parquet file that contains audio data (dict with "bytes").
audio_column: audio
# Output audio file extension.
audio_format: flac
# Column used for audio filename.
filename_column: fname
# List of columns to include in the metadata object.
metadata_columns:
- fname
- text
- duration
- gender
- speaker_id
- lang
# Name of the master JSONL file. Set to null to disable.
master_jsonl: master.jsonl
# Number of parallel workers (1 to CPU count).
workers: 1
# Whether to overwrite existing audio files.
overwrite: false
# Log level: DEBUG | INFO | WARNING | ERROR
log_level: INFO
CLI Commands
vakya extract ROOT_DIR: Recursively finds Parquet files and extracts them.vakya validate-config CONFIG_PATH: Checks if your YAML config is valid.vakya schema PARQUET_FILE: Prints the Arrow schema and row count of a Parquet file.
Output Format
root_dataset/
├── hindi/
│ ├── train-00000.parquet
│ ├── hindi_audio/ ← Audio files here
│ │ ├── sample_001.flac
│ │ └── sample_002.flac
│ └── hindi.jsonl ← Metadata for this folder
├── master.jsonl ← Aggregated metadata
└── config.yaml
Each line in the .jsonl files:
{
"audio_path": "hindi/hindi_audio/sample_001.flac",
"metadata": {
"fname": "sample_001",
"text": "Hello world",
"duration": 3.45,
"gender": "female"
}
}
Development
Install development dependencies:
pip install -e ".[dev]"
Run tests:
pytest
Run linting (Ruff):
ruff check src/ tests/
Run type checking (Mypy):
mypy src/ tests/
CI/CD and Branching
- Main Branch:
master - CI: Every push/PR to
masterruns linting, type checking, and tests. - Publishing: Automatic publishing to PyPI on version tags (
v*.*.*) after tests pass. Requires GitHub environment approval.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vakya-0.1.2.tar.gz.
File metadata
- Download URL: vakya-0.1.2.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de4fefb23d8a70b54973eea95dc196b12cd2d00bcf8179de792969f1dd4df18
|
|
| MD5 |
849c04904857618c8914deaa4795c019
|
|
| BLAKE2b-256 |
e7d8152a1a30d129f8d27b9537120a30520bc32d34b28c1bb7b5c8aa01f15590
|
Provenance
The following attestation bundles were made for vakya-0.1.2.tar.gz:
Publisher:
publish.yml on AbhijithMallya/vakya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vakya-0.1.2.tar.gz -
Subject digest:
9de4fefb23d8a70b54973eea95dc196b12cd2d00bcf8179de792969f1dd4df18 - Sigstore transparency entry: 1101506277
- Sigstore integration time:
-
Permalink:
AbhijithMallya/vakya@fa902438e3b5a67374c750a96b7a65cfd8c649e6 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/AbhijithMallya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fa902438e3b5a67374c750a96b7a65cfd8c649e6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vakya-0.1.2-py3-none-any.whl.
File metadata
- Download URL: vakya-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ec1ec0c88b6e1a8b3f4d1b2128abc4d4efb4aeea362a2d8bcb6bf00568c91b4
|
|
| MD5 |
66c97a8dee75ad345be4f2d0f227308c
|
|
| BLAKE2b-256 |
034f3ee3a842efa14bf46d84d002bf1f5f640d03e3f5a2bea5a9255e2d5aa366
|
Provenance
The following attestation bundles were made for vakya-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on AbhijithMallya/vakya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vakya-0.1.2-py3-none-any.whl -
Subject digest:
7ec1ec0c88b6e1a8b3f4d1b2128abc4d4efb4aeea362a2d8bcb6bf00568c91b4 - Sigstore transparency entry: 1101506334
- Sigstore integration time:
-
Permalink:
AbhijithMallya/vakya@fa902438e3b5a67374c750a96b7a65cfd8c649e6 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/AbhijithMallya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fa902438e3b5a67374c750a96b7a65cfd8c649e6 -
Trigger Event:
workflow_dispatch
-
Statement type: