Skip to content

An unofficial PyPI package for LVC (zero-shot voice conversion)

License

Notifications You must be signed in to change notification settings

ml-for-speech/lvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LVC

Unofficial pip-installable Python package for LVC-VC (zero-shot voice conversion) by Wonjune Kang, Mark Hasegawa-Johnson, Deb Roy.

NOTE: I am not affiliated with the authors of LVC-VC (the individuals listed above).

Installation

pip install lvc

Usage

You can either convert files or convert arrays.

Convert Files

from lvc import LVC, LVCAudio
l = LVC()

l.infer_file(
    'orig.wav',
    'sample.wav',
    'target.wav',
)

Convert Arrays

from lvc import LVC, LVCAudio
import librosa
import soundfile as sf
l = LVC()

o_y, o_sr = librosa.load('orig.wav')
s_y, s_sr = librosa.load('sample.wav')

o, sr = l.infer_array(
    LVCAudio(o_y, o_sr),
    LVCAudio(s_y, s_sr),
)
sf.write('out.wav', o, sr)

Don't use XL model

You can optionally use a smaller model for lower-quality but faster results:

l = LVC(use_xl_model=False) # default True

Debugging

If you get an error it's because the model only currently supports short clips. I'm planning to fix this soon, but PRs are welcome!

License

MIT

About

An unofficial PyPI package for LVC (zero-shot voice conversion)

Resources

License

Stars

Watchers

Forks

Packages

No packages published