Skip to main content

ATdataset

A streaming audio-text dataloader for PyTorch training, built on WebDataset.

Designed for large-scale speech recognition training with multi-dataset muxing, dynamic batching, bucketing, and on-the-fly augmentation.

Install

pip install atdataset

For development:

git clone https://github.com/pkufool/ATdataset.git
cd ATdataset
pip install -e ".[dev]"

Quick Start

from atdataset import ATDataloader

dl = ATDataloader(
    datasets="data/tars/train.lst",
    sample_rate=16000,
    max_duration=600.0,
)

for batch in dl:
    audio = batch["audio"]          # (B, T), padded
    audio_lens = batch["audio_lens"]  # (B,)
    feature = batch["feature"]      # (B, T, F), padded
    feature_lens = batch["feature_lens"]  # (B,)
    texts = batch["text"]           # list of str
    break

CLI Tools

After installation, the atdataset command provides two subcommands:

# Build tar shards from a TSV manifest
atdataset build --input train.tsv --output-dir data/tars --num-tars 64

# Generate a .lst file from existing tar shards
atdataset gen_lst --audio-pattern 'data/tars/audios/*.tar' \
    --txt-dir data/tars/manifests --output data/tars/train.lst

Run atdataset build --help or atdataset gen_lst --help for full option details.

Documentation

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atdataset-0.2.6.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

atdataset-0.2.6-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

Details for the file atdataset-0.2.6.tar.gz.

File metadata

  • Download URL: atdataset-0.2.6.tar.gz
  • Upload date:
  • Size: 43.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.20

File hashes

Hashes for atdataset-0.2.6.tar.gz
Algorithm Hash digest
SHA256 2a738fc7e047ea9b36e3af94d3b41f597b9288fa24f2ae2003e6508398ebfcdd
MD5 2f3e3abddb8032df4fd7960e73812907
BLAKE2b-256 a164fb2d298b44e35935e4935fb12274d0f703c6fc81f9aae9765087168e3478

See more details on using hashes here.

File details

Details for the file atdataset-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: atdataset-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 42.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.20

File hashes

Hashes for atdataset-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2c43bfd4d0cc8a0c4a78f96e57ea3199a31fdfe2308519e3cfb54efaae776cea
MD5 69561f005302d314e6c2c9cb57678692
BLAKE2b-256 8ffc825d438308614bee382dab231ff97d856a0374309c15a4ec3b59fa31964c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page