This repo contains a Jupyter Notebook which demonstrates the combination
of pyAudioAnalysis and FFmpeg
to cut any input video into distinct segments containing speech. To do this,
it uses pyAudioAnalysis audioSegmentation.silence_removal()
function to find the start and end
times of speech segments, and a bunch of FFmpeg calls for all audio and video conversions, cuts and concatenations.
conda
or some other environment manager to create a virtual environment.python 3.7
and thelinux
distro of your choice are recommended.ffmpeg
must be installed and in the path. See here for more info.
Clone this repo while making sure to include --recursive
to also get the pyAudioAnalysis submodule.
git clone --recursive git@github.com:bjoernpl/VideoSilenceRemover
To install pyAudioAnalysis, first make sure your virtual environment is activated.
cd ./pyAudioAnalysis
pip install -r ./requirements.txt
pip install -e .
cd ..
pip install -r ./requirements.txt
You can now run the notebook by calling jupyter lab
or jupyter notebook
.
For more info on the usage, see the explanations in VideoSegmentation.ipynb
This repo relies mainly on the pyAudioAnalysis library. Thanks very much to it's creators and contributors.
@article{giannakopoulos2015pyaudioanalysis,
title={pyAudioAnalysis: An Open-Source Python Library for Audio Signal Analysis},
author={Giannakopoulos, Theodoros},
journal={PloS one},
volume={10},
number={12},
year={2015},
publisher={Public Library of Science}
}
Thanks also to the creators and contributors at FFmpeg for their awesome tool.