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).
pip install lvc
You can either convert files or convert arrays.
from lvc import LVC, LVCAudio
l = LVC()
l.infer_file(
'orig.wav',
'sample.wav',
'target.wav',
)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)You can optionally use a smaller model for lower-quality but faster results:
l = LVC(use_xl_model=False) # default TrueIf 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!
MIT