this script uses whisper on replicate to download the audio and then separate the speakers from a youtube video.
-
input: youtube url
-
output: audio files for each speaker, with all spoken parts of that speaker cut together.
this output can then be used to create ai voices for each speaker, for example with instant voice cloning by elevenlabs (note: elevenlabs only official allows this for voices that you own the rights to, i don't take any responsibility for any illegal use of this software.)
create a virtual environment and install the requirements:
python3 -m venv .myenv
source .myenv/bin/activate
pip3 install -r requirements.txt
copy and rename .env.sample
to .env
and fill the REPLICATE_API_TOKEN
field with your replicate api token.
run the script with a youtube url as argument:
python3 script.py "youtube_url"
mit