Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

DAS

DAS 1.0a4 segments and annotates audio with Conformer, TCN, TweetyNet, and WhisperSeg models.

Installation

conda create -y -n das python=3.12 uv
conda activate das
uv pip install "das[gui]==1.0a4"

For development from a source checkout, install the test and docs extras too:

uv pip install -e ".[dev,gui,doc]"

When upgrading PyTorch in an environment that also has torchvision installed, upgrade them together:

uv pip install --upgrade torch torchvision torchaudio
uv pip check

Mismatched PyTorch and torchvision binaries can cause an MPS crash at shutdown.

The GUI uses xarray-behave. Run das or das gui to open the single-file annotation view and its Train and Predict dialogs.

Usage

Python API:

import das

checkpoint = das.train(
    data_dir="/path/to/audio",
    output_dir="/path/to/run",
)

written_files = das.predict(
    data_dir="/path/to/audio",
    checkpoint=checkpoint,
    existing_annotations="merge",
)

annotations = das.predict(
    audio=waveform,
    samplerate=16_000,
    checkpoint=checkpoint,
)

Prediction writes each annotation CSV next to its audio file by default. Set output_dir="/path/to/predictions" to collect them in one directory. Set output_dir="", or pass raw audio, to return annotation DataFrames instead of writing prediction CSV files. Training still writes to ./ by default. Prediction handles existing output CSV files with existing_annotations="skip", "overwrite" (default), or "merge". The CLI equivalent is --existing-annotations.

Training reads annotated WAV folders directly; no dataset generation step is needed. It also accepts existing DAS .npy, H5, and Zarr training datasets. Other audio formats supported by the current DAS release remain available through the existing dataset-generation path.

Minimal CLI:

das train \
  --data-dir /path/to/audio \
  --output-dir /path/to/run \
  --config /path/to/train.yaml \
  --frontend mel \
  --batch-size 16
das predict \
  --data-dir /path/to/audio \
  --checkpoint /path/to/run/checkpoints/best-epoch=000.ckpt \
  --output-dir /path/to/predictions \
  --config /path/to/predict.yaml \
  --evaluate \
  --syllable-tolerance-ms 20
das predict \
  --data-dir /path/to/audio \
  --checkpoint /path/to/run/checkpoints/best-epoch=000.ckpt \
  --output-dir /path/to/predictions \
  --config /path/to/predict.yaml \
  --existing-annotations merge \
  --output-suffix _frames.csv

CLI flags and YAML use the same flat field names. Config files can be partial, and --config can be provided multiple times. The merge order is defaults, then config files in the order provided, then explicit CLI flags.

--config also accepts built-in config names: fly-pulse, fly, zebra-finch, and tweetynet. fly-pulse selects the 1 ms raw-waveform ConvResNet plus compact TCN. They load through the same merge path as YAML files:

das train \
  --config fly-pulse \
  --data-dir /path/to/audio \
  --output-dir /path/to/run

Legacy DAS models saved as *_model.h5 plus *_params.yaml can be used with the same predict command by pointing --checkpoint at the shared trunk path:

das predict \
  --data-dir /path/to/audio \
  --checkpoint /path/to/test \
  --output-dir /path/to/predictions

They can also be converted once to a native Torch checkpoint that loads through DASModel.load_from_checkpoint():

das convert-legacy \
  --checkpoint /path/to/test \
  --output /path/to/test.ckpt

The converted checkpoint can then be passed to das predict like any native checkpoint.

WhisperSeg offers compact FP16 AER starting models in Tiny, Base, Small and Large sizes. Select one in the GUI or use --initial-model whisperseg-aer:small-ms. Training defaults to decoder LoRA; --whisperseg-training-method full selects FP32 fine-tuning. Selecting a training checkpoint as the initial model automatically resumes its adapters, optimizer and scheduler. See WhisperSeg training and prediction.

For native checkpoints, das predict uses the saved chunk length, stride, and class names from the trained model. Legacy DAS models use the saved legacy window size, stride, and class labels from the model params. Evaluation works through das predict --evaluate, with optional --split train|val|test for split-backed datasets.

Print a starter config for a subcommand:

das train --print-config

Save the effective config for a run:

das train \
  --data-dir /path/to/audio \
  --output-dir /path/to/run \
  --encoder tcn \
  --save-config /path/to/run-config.yaml

Segment detection uses adjustable low and high hysteresis thresholds. The CLI, YAML config, and GUI Train and Predict dialogs expose these thresholds, event thresholds and spacing, and manual postprocessing settings.

Built-in TCN encoder example:

das train \
  --data-dir /path/to/audio \
  --output-dir /path/to/run \
  --encoder tcn \
  --encoder-hidden-size 32 \
  --encoder-num-layers 4 \
  --encoder-dilations [1,2,4,8,16]

Example flat config:

mode: train
data_dir: /path/to/audio
output_dir: /path/to/run
batch_size: 16
num_time_steps: 2048
frontend_type: raw
encoder_type: tcn
encoder_hidden_size: 16
encoder_num_layers: 2
encoder_dilations: [1, 2, 4, 8]
decoder_type: linear
learning_rate: 0.01
num_epochs: 20

Metadata

Release files for das 1.0a4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for das 1.0a4
File Size Uploaded Provenance
das-1.0a4.tar.gz 122.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for das 1.0a4
File Interpreter ABI Platform
das-1.0a4-py3-none-any.whl Python 3 none any Details

Total release size: 256.1 kB

Release files / das-1.0a4.tar.gz

Download URL das-1.0a4.tar.gz
Size 122.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2f19590cd625e67eef6ad578e43ffa0e55502bbb50b3ae1be7a799d884d5cd60
BLAKE2b-256 checksum
How to use checksums
b09f114f50d72acc704116c25228a5767c1c27b36cc9538b9c69d3ef6a036b71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / das-1.0a4-py3-none-any.whl

Download URL das-1.0a4-py3-none-any.whl
Size 133.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6802946329d34bfe0098a9335f69939518eeb024d2fd22913935cd889868f07
BLAKE2b-256 checksum
How to use checksums
d6c01c64ef143625ad8b223266d9f43931cc2e4e77b43ad09570e0aeec255dce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for das 1.0a4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
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