4.0.2

pydantic/monty4.0.2Nov 19, 2025by github-actions[bot]

AI Summary

This update adds performance and usability enhancements such as a `Pipeline.cuda()` convenience method and directory processing capabilities, alongside a breaking change in the Binarize utility.

Key Highlights

  • Added `Pipeline.cuda()` convenience method
  • Added `preload` option to base `Pipeline.__call__` to force preloading audio
  • Added CLI option to apply pipeline on a directory of audio files
  • Fixed segmentation faults by pinning torch, torchaudio, and torchcodec versions
  • Made `permutate` faster thanks to vectorized cost function

Breaking Changes

  • Binarize.__call__ now returns string tracks instead of int

New Features

  • Add `Pipeline.cuda()` convenience method
  • Add preload option to base `Pipeline.__call__`
  • Add option to apply pipeline on a directory of audio files
  • Make `permutate` faster thanks to vectorized cost function

Full Release Notes

## What's Changed

- BREAKING(util): make `Binarize.__call__` return `string` tracks (instead of `int`) [@benniekiss](https://github.com/benniekiss/)
- fix(torch): pin `torch`, `torchcodec`, and `torchaudio` versions to [avoid segmentation fault](https://github.com/meta-pytorch/torchcodec/issues/995) 
- fix(pyannoteAI): update pyannoteAI wrapper to return both regular and exclusive diarization
- feat(pipeline): add `Pipeline.cuda()` convenience method [@tkanarsky](https://github.com/tkanarsky/)
- feat(pipeline): add `preload` option to base `Pipeline.__call__` to force preloading audio in memory ([@antoinelaurent](https://github.com/antoinelaurent/))
- feat(cli): add option to apply pipeline on a directory of audio files
- improve(util): make `permutate` faster thanks to vectorized cost function

## New Contributors
* @tkanarsky made their first contribution in https://github.com/pyannote/pyannote-audio/pull/1950

**Full Changelog**: https://github.com/pyannote/pyannote-audio/compare/4.0.1...4.0.2