By Sean Bailey January 18, 2022
BaileyTec LLC is Proud to Announce the release of our Open Source Voice Isolation Tool, Torchspleeter
Background
BaileyTec Labs have been hard at work creating voice isolation tools to help generate datasets for our branded voice programs. One such tool currently available on the market is the Spleeter project. Spleeter is a powerful, open-source tool which enables users to separate elements of an audio track such as voice from background sound. However, it is complicated to install and use, and for the practical purposes of generating voice datasets en-masse, could be simplified. After a bit of research, we found spleeter-pytorch, an open source project in an attempt to convert the Tensorflow dominated Spleeter project into a more widely compatible PyTorch Based system.
This lead us to build from this work, and generate a fully fledged Python module which can be installed and imported in a simple, straightforward manner, with the 2stems
model built in to the library. Enter TorchSpleeter:
pip install torchspleeter
torchspleeter -i ./test_input.wav -o ./testoutput/
This provides a simple CLI which allows the user to specify an input file and an output directory, with TorchSpleeter handling the rest, producing, by default, a file with the voice isolated, and a file with the background noise and the voice removed. TorchSpleeter is compatible with many of the current stems
models out there, however to ensure compatibility inherent with a pure PyTorch implementation, we have not included a conversion tool for these models in this library yet. We will, however, be releasing a separate conversion tool to allow you to convert the stems
model of your choice.
If you’d like to use a Python imlementation:
from torchspleeter.command_interface import *
outputfiles=split_to_parts(input_audio_file,output_directory)
You’ll be returned a list of the voice and background files, respectively.
For a quick demonstration, let’s grab a sample from a common royalty-free Youtube Music source leveraging acoustic guitar and vocals: