Metadata-Version: 2.3
Name: vocal
Version: 0.0.5
Summary: A vocal source separation
Project-URL: Homepage, https://github.com/seanghay/vocal
Project-URL: Repository, https://github.com/seanghay/vocal
Author-email: Seanghay Yath <seanghay.dev@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Seanghay Yath
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: click
Requires-Dist: huggingface-hub
Requires-Dist: librosa
Requires-Dist: numpy
Requires-Dist: soundfile
Requires-Dist: torch
Requires-Dist: tqdm
Description-Content-Type: text/markdown

# Vocal

A vocal source separation


```
pip install vocal
```

```python
import librosa
import soundfile as sf
from vocal import get_model, separate_vocal

device = "cuda" # or cpu
audio, sr = librosa.load("audio.wav", sr=44100, mono=False)
model = get_model(device) # download model from HF
audio_data = separate_vocal(model, audio, device, silent=False)
sf.write("vocal.mp3", format="MP3", data=audio_data.T, samplerate=sr)
```


## CLI

Sinlge file

```shell
vocali -i audio.mp3 -o output.mp3
```

Folder

```shell
vocali -i audio/ -o output --recursive
```