Skip to main content

batchalign

TalkBank CHAT processing pipeline — ASR, forced alignment, morphosyntax (%mor / %gra), utterance segmentation, translation, and compare. The user-facing Python package; the runtime is a PyO3 extension backed by the Rust crates in crates/batchalign/.

User and developer docs live in book/src/batchalign/ (the mdBook is the source of truth). See book/src/batchalign/developer/building.md for the canonical build recipe.

Install

From PyPI (stable wheels):

pip install batchalign

From source: use the just recipes — they go through Bazel, so every dep (proto codegen, Rust crates, PyO3 extension, Python wheel extras) is materialized for you. Don't reach for maturin develop or uv sync directly unless you're debugging the build itself.

just batchalign build              # build every Bazel target for batchalign
just batchalign test               # run every Bazel test target
just batchalign cli --help         # run `batchalign3` via the development bridge
just batchalign pytest             # pytest (with full Bazel dep graph)
just batchalign wheel              # host-platform wheel at python/target/wheels/
just batchalign sidecar            # standalone daemon binary via PyApp
just batchalign lint               # mypy (+ ruff)
just batchalign versions           # source-of-truth version readout

just --list batchalign shows the full recipe list. The just recipes call into Bazel, so tools/bazel (the bundled wrapper) takes care of:

  • regenerating the pydantic-v2 wire types from crates/batchalign/batchalign-core/src/proto/*.rs
  • rebuilding the batchalign_core PyO3 cdylib via maturin under the hood
  • staging the binary into the wheel
  • propagating dependency changes to dependent targets

If you genuinely need bazel directly (because a recipe you want isn't wrapped):

bazel build //...           # everything
bazel test //...            # everything
bazel run //book:html       # static book HTML
bazel run //apps/batchalign/batchalign-gui:openapi   # GUI OpenAPI codegen

The base wheel ships only the lightweight runtime. Heavy ML backends are gated behind extras — install only what you use:

pip install 'batchalign[whisper]'      # Whisper ASR
pip install 'batchalign[malayalam]'    # Malayalam Wav2Vec2 XLSR ASR
pip install 'batchalign[stanza]'       # morphosyntax (%mor / %gra)
pip install 'batchalign[pyannote]'     # optional local Pyannote backend API
pip install 'batchalign[revai]'        # Rev.AI cloud ASR
pip install 'batchalign[google]'       # Gemini cloud ASR + diarization
pip install 'batchalign[cantonese]'    # Cantonese pipeline (FunASR, Tencent)
pip install 'batchalign[qwen3]'        # Qwen3 ASR + forced aligner
pip install 'batchalign[nllb]'         # NLLB translation
pip install 'batchalign[api]'          # FastAPI daemon (`batchalign3 daemon`)
pip install 'batchalign[all]'          # everything

CLI

batchalign3 --help

batchalign3 transcribe input_dir -o output_dir --lang eng
batchalign3 transcribe input_dir -o output_dir --lang eng --engine whisper --diarize --diarize-engine pyannote-ai
batchalign3 diarize    input_dir -o output_dir --engine pyannote-ai
batchalign3 align     input_dir -o output_dir --engine wav2vec
batchalign3 morphotag input_dir -o output_dir --language en
batchalign3 utseg     input_dir -o output_dir
batchalign3 translate input_dir -o output_dir --target eng
batchalign3 compare   input_dir gold_dir   -o output_dir

batchalign3 version                    # banner, version, git SHA
batchalign3 cache {path,stats,clear}   # local result cache
batchalign3 daemon                     # FastAPI server (needs [api])

When -o is omitted, results are written back in place. The CLI accepts either a single CHAT/media file or a folder (walked recursively).

The diarization CLI defaults to pyannoteAI cloud. Select the optional local backend with --engine pyannote (or --diarize-engine pyannote on transcribe). Configure the cloud API key in the shared Batchalign config file (or set BATCHALIGN_PYANNOTE_KEY):

[diarize]
engine.pyannote.key = YOUR_API_KEY

Programmatic API

import batchalign as ba

# Build a backend chain.
pipeline = ba.recipes.morphotag(
    stanza_backend=ba.StanzaBackend(lang="en"),
)

# Or compose your own.
asr = ba.WhisperBackend(language=ba.LanguageCode.from_iso("eng"))
utseg = ba.CHATUtteranceBackend(model="talkbank/CHATUtterance-en")
pipeline = ba.recipes.transcribe(asr_backend=asr, utseg_backend=utseg)

# Run.
inputs = [ba.media_from_path("session.wav")]
outcomes = list(pipeline.run(inputs))
for outcome in outcomes:
    outcome.write("session.cha")

Repository layout

This package is one slice of the talkbank-tools monorepo:

  • python/batchalign/ — Python package (this file).
  • crates/batchalign/ — Rust crates (batchalign-core, batchalign-engine).
  • The pinned TalkBank Chatter dependency supplies CHAT parsing, models, and transforms.
  • apps/batchalign/batchalign-gui/ — Tauri desktop GUI.
  • book/ — user + developer documentation (mdBook; source of truth).

For repo conventions, build commands, and the BA3 cutover plan, see CLAUDE.md at the repo root and book/src/batchalign/developer/landing-status.md.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

batchalign-0.10.0-cp310-abi3-win_amd64.whl (7.8 MB view details)

Uploaded CPython 3.10+Windows x86-64

batchalign-0.10.0-cp310-abi3-manylinux_2_35_x86_64.whl (17.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.35+ x86-64

batchalign-0.10.0-cp310-abi3-manylinux_2_35_aarch64.whl (16.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.35+ ARM64

batchalign-0.10.0-cp310-abi3-macosx_11_0_arm64.whl (9.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

batchalign-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl (9.1 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file batchalign-0.10.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: batchalign-0.10.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 7.8 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for batchalign-0.10.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 06bc58aae1fa895088aebdf0adb4b6e21526036e2e27509cf29d7a546e48bddf
MD5 09b13bcac624ad3371d19053eed17b60
BLAKE2b-256 717c251f901101769df3e4c071bf567815fa5fd6f1c18ddb32b11806e5838920

See more details on using hashes here.

File details

Details for the file batchalign-0.10.0-cp310-abi3-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for batchalign-0.10.0-cp310-abi3-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 f61a7ee5bf060c66ace19db0a445dbf5bf56157985cb8999a4be812bea48bd83
MD5 b71eb3a3e81d688be0c15f32b05f81dd
BLAKE2b-256 a657e0a365c2d526be8a1d1c13b85e39da72baaede55210624ab688cf75fb901

See more details on using hashes here.

File details

Details for the file batchalign-0.10.0-cp310-abi3-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for batchalign-0.10.0-cp310-abi3-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 0b0bffe1bb7213c6b9ced0df14552d73a8c499a84814db0b9645684fd45ad48d
MD5 f70ed1090f7a172b4e50e55ccfad9f2a
BLAKE2b-256 9b6d68acb3f1ca57ab0695309d253016d73b32ac7ef752e80f10f8562b24c476

See more details on using hashes here.

File details

Details for the file batchalign-0.10.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for batchalign-0.10.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cfad26c920b01c8d33bd422abdb8251c5b5b9c9a4585c50ec8acb099d0cfd37b
MD5 f093ad483f773a8be67aead8611f396e
BLAKE2b-256 a4176b4c64cc0e06fa04f885b71a4188e75c247b7517efc94efd88f754e88589

See more details on using hashes here.

File details

Details for the file batchalign-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for batchalign-0.10.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a0b22c8f009931a586d8ce5ae621ce8f15a9023f94fdf316938e5a3020390c07
MD5 4fbbcc41e5a38c3d6ca22f004cd949cb
BLAKE2b-256 e06974520bd260b0d6940da7a2f84e6dd5b003ee340343279e0c1f73861c2533

See more details on using hashes here.

Release history Release notifications | RSS feed

0.10.0.post3

5 files

0.10.0.post2

5 files

0.10.0.post1

5 files

This release

0.10.0 This release

5 files

0.8.2.post15

1 file

0.8.2.post14

1 file

0.8.2.post13

1 file

0.8.2.post12

1 file

0.8.2.post11

1 file

0.8.2.post10

1 file

0.8.2.post9

1 file

0.8.2.post8

1 file

0.8.2.post7

1 file

0.8.2.post6

1 file

0.8.2.post4

1 file

0.8.2.post3

1 file

0.8.2.post2

1 file

0.8.2.post1

1 file

0.8.2

1 file

0.8.1.post14

1 file

0.8.1.post13

1 file

0.8.1.post12

1 file

0.8.1.post11

1 file

0.8.1.post10

1 file

0.8.1.post8

1 file

0.8.1.post7

1 file

0.8.1.post6

1 file

0.8.1.post5

1 file

0.8.1.post4

1 file

0.8.1.post3

1 file

0.8.1.post2

1 file

0.8.1.post1

1 file

0.8.1

1 file

0.8.0.post4

1 file

0.8.0.post3

1 file

0.8.0.post2

1 file

0.8.0.post1

1 file

0.8.0

1 file

0.7.22.post20

1 file

0.7.22.post19

1 file

0.7.22.post18

1 file

0.7.22.post17

1 file

0.7.22.post16

1 file

0.7.22.post14

1 file

0.7.22.post13

1 file

0.7.22.post12

1 file

0.7.22.post11

1 file

0.7.22.post10

1 file

0.7.22.post9

1 file

0.7.22.post8

1 file

0.7.22.post7

1 file

0.7.22.post5

1 file

0.7.22.post4

1 file

0.7.22.post3

1 file

0.7.22.post2

1 file

0.7.22.post1

1 file

0.7.22

1 file

0.7.21.post11

1 file

0.7.21.post10

1 file

0.7.21.post9

1 file

0.7.21.post8

1 file

0.7.21.post6

1 file

0.7.21.post5

1 file

0.7.21.post4

1 file

0.7.21.post3

1 file

0.7.21.post2

1 file

0.7.21.post1

1 file

0.7.21

1 file

0.7.20.post18

1 file

0.7.20.post17

1 file

0.7.20.post16

1 file

0.7.20.post15

1 file

0.7.20.post14

1 file

0.7.20.post13

1 file

0.7.20.post12

1 file

0.7.20.post11

1 file

0.7.20.post10

1 file

0.7.20.post9

1 file

0.7.20.post8

1 file

0.7.20.post7

1 file

0.7.20.post6

1 file

0.7.20.post5

1 file

0.7.20.post4

1 file

0.7.20.post3

1 file

0.7.20.post2

1 file

0.7.20.post1

1 file

0.7.20

1 file

0.7.19.post15

1 file

0.7.19.post12

1 file

0.7.19.post11

1 file

0.7.19.post10

1 file

0.7.19.post9

1 file

0.7.19.post8

1 file

0.7.19.post7

1 file

0.7.19.post6

1 file

0.7.19.post5

1 file

0.7.19.post4

1 file

0.7.19.post3

1 file

0.7.19.post1

1 file

0.7.19

1 file

0.7.18.post12

1 file

0.7.18.post11

1 file

0.7.18.post10

1 file

0.7.18.post9

1 file

0.7.18.post8

1 file

0.7.18.post7

1 file

0.7.18.post6

1 file

0.7.18.post5

1 file

0.7.18.post4

1 file

0.7.18.post3

1 file

0.7.18.post2

1 file

0.7.18.post1

1 file

0.7.18

1 file

0.7.17.post17

1 file

0.7.17.post16

1 file

0.7.17.post15

1 file

0.7.17.post14

1 file

0.7.17.post13

1 file

0.7.17.post12

1 file

0.7.17.post11

1 file

0.7.17.post10

1 file

0.7.17.post9

1 file

0.7.17.post8

1 file

0.7.17.post7

1 file

0.7.17.post6

1 file

0.7.17.post5

1 file

0.7.17.post4

1 file

0.7.17.post3

1 file

0.7.17.post2

1 file

0.7.17.post1

1 file

0.7.17.post0

1 file

0.7.17

1 file

0.7.16

1 file

0.7.15.post0

1 file

0.7.15

1 file

0.7.14

1 file

0.7.13.post1

1 file

0.7.13

1 file

0.7.12

1 file

0.7.10.post5

1 file

0.7.10.post4

1 file

0.7.10.post2

1 file

0.7.10.post1

1 file

0.7.10.post0

1 file

0.7.10

1 file

0.7.9.post4

1 file

0.7.9.post3

1 file

0.7.9.post2

1 file

0.7.9.post1

1 file

0.7.9.post0

1 file

0.7.9

1 file

0.7.8

1 file

0.7.7.post1

1 file

0.7.7

1 file

0.7.4

1 file

0.7.2

1 file

0.7.0

1 file

0.5.3

1 file

0.4.2

1 file

0.4.1.post0

1 file

0.4.1

1 file

0.4.0.post4

1 file

0.4.0.post3

1 file

0.4.0.post2

1 file

0.4.0.post1

1 file

0.4.0.post0

1 file

0.4.0

1 file

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