Skip to main content

A package for blind source separation and beamforming in pytorch .

  • supports many BSS and beamforming methods

  • supports memory efficient gradient computation for training neural source models

  • supports batched computations

  • can run on GPU via pytorch

Quick Start

The package can be installed via pip:

pip install torchiva

Separation using Pre-trained Model

We provide a pre-trained model in trained_models/tiss. You can easily try separation with the pre-trained model:

# Separation
python -m torchiva.separation INPUT OUTPUT

where INPUT is either a multichannel wav file or a folder containing multichannel wav files. If a folder, then all the files inside are separted. The output is saved to OUTPUT. The model stored in trained_models/tiss is automatically downloaded to $HOME/.torchiva_models. The path or url to the model can also be manually provided via the --model option. The model was trained on the WSJ1-mix dataset with the same configuration as ./examples/configs/tiss.json.

Training

We provide some simple training scripts. We support training of T-ISS, MWF, MVDR, GEV:

cd examples

# install some modules necessary for training
pip install -r requirements.txt

# training
python train.py PATH_TO_CONFIG PATH_TO_DATASET

Note that our example scripts assumes using WSJ1-mix dataset. If you want to use other datasets, please change the script in the part that loads audios.

Test your trained model with checkpoint from epoch 128:

# python ./test.py --dataset ../wsj1_6ch --n_fft 2048 --hop 512 --n_iter 40 --iss-hparams checkpoints/tiss_delay1tap5_2ch/lightning_logs/version_0/hparams.yaml --epoch 128 --test

Export the trained model for later use:

python ./export_model.py ../trained_models/tiss checkpoints/tiss_delay1tap5_2ch/lightning_logs/version_0 128 146 148 138 122 116 112 108 104 97

Run the example script using the exported model:

python ./example_dnn.py ../wsj1_6ch ../trained_models/tiss -m 2 -r 100

Authors

License

2022 (c) Robin Scheibler, Kohei Saijo, LINE Corporation.

All of this code is released under MIT License

Metadata

Release files for torchiva 0.1.1

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

Source distribution (sdist)

Source distribution for torchiva 0.1.1
File Size Uploaded Provenance Actions
torchiva-0.1.1.tar.gz 33.8 kB Without provenance Details for torchiva-0.1.1.tar.gz

Release files / torchiva-0.1.1.tar.gz

Download URL torchiva-0.1.1.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
083e1fc06113814877808aa590157be30c51630dcbe6ded03ce01e0be85a2d8f
BLAKE2b-256 checksum
How to use checksums
304655899b06795b1ba4035355dcd0f12dd0ff973b3aca38db9e77efdaeb0424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Security for torchiva 0.1.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

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