Package: unsilence
UnsilenceConsole Interface and Library to remove silent parts of a media fileDemoUnedited (Before)Processed by Unsilence (After)Time before edit: 0:09:45 (100%)Time after edit: 0:07:56 (81.2%), Difference: -0:01:50 (-18.8%)The MIT Intro at the beginning is not included into the time, since I left it in to show the license of the videos.These videos are from this online lecture:Ana Bell, Eric Grimson, and John Guttag. 6.0001 Introduction to Computer Science and Programming in Python. Fall 2016. Massachusetts Institute of Technology: MIT OpenCourseWare,https://ocw.mit.edu. License: Creative Commons BY-NC-SA.More Information about Licensing can be found in the Licensing Segment of this README.IntroductionUnsilence is anopen-source toolthatremoves silencefrom a media clip of your choice (audio, video).You can use it tospeed upvideos without changing the audible speed, so you can understand everything, but get through a videofaster.Exemplary use casesYou are a college student and watch your lectures online (but have access to the video files). Instead of just increasing the playback speed to ~1.5x, you can remove
the parts that do not contain any value, like your lecturer thinking or waiting for something. But instead of cutting out these silent parts, speeding them up by a
different, much faster factor (think 6-8x) makes you still able to follow what is happening, so drawing or writing with no speech is sped up, which makes it far more pleasant to watchYou want a video editor that automatically cuts any time you talk (or make any sound). That could be useful for manual time lapses
(you make a sound every time a short segment should be recorded), or for very fast jump cut videos with no manual editing requiredYou want to have some fun and remove all the audible parts from a video, leaving only the parts where nearly silent noises are in the video (breathing, writing, ...)CommunicationIf you have any (technical) questions about unsilence or want to get community feedback, you can use the newGitHub Discussions Feature. To report a bug or suggest a new feature, create a new issue instead.Usage InformationUnsilence can be used as a console line interface or as a python library, with which you can develop your own projectsPrerequisitesPython>= 3.7.0pip(should be installed automatically with python, could be different on some linux distros)ffmpeg>= 4.2.4In order to see the fancy progress bar and other terminal styling on windows, you should useWindows Terminal.Installation as command line interface (using pip and pipx)# Installing pipxpipinstallpipx# Installing Unsilence as Command Line Softwarepipxinstallunsilence# If pipx asks you to, you also need to execute the following line# as well as close and reopen your terminal windowpipxensurepathInstallation as library (using pip)# Installing Unsilence as Command Line SoftwarepipinstallunsilenceInstallation as command line interface (from source)# Clone the repository (stable branch)gitclone-bmasterhttps://github.com/lagmoellertim/unsilence.gitunsilence#Change Directorycdunsilence# Install pip packagespipinstall-rrequirements.txt
pipinstallpipx# Install unsilence packagepipxinstall.Installation as library (from source)# Clone the repository (stable branch)gitclone-bmasterhttps://github.com/lagmoellertim/unsilence.gitunsilence#Change Directorycdunsilence# Install pip packagespipinstall-rrequirements.txt# Install unsilence packagepython3setup.pyinstallBasic Command Line UsageThis generates a new file, where the silent parts are 6x as fast as before, the audible parts are the same speed as beforeunsilence[input_file][output_file]You can change the speed of audible parts with-as [speed], the speed of silent parts with-ss [speed]unsilence[input_file][output_file]-as[speed]-ss[speed]You can change the volume of audible parts with-av [volume], the volume of silent parts with-sv [volume]unsilence[input_file][output_file]-av[volume]-sv[volume]To generate an audio only output file, you can add the-aoflagunsilence[input_file][output_file]-aoTo speed up the rendering process, you can increase the thread count using-t [threads]unsilence[input_file][output_file]-t[threads]For many more settings, type-hor--helpunsilence--helpBasic Library UsageTake a look at thisexampleIdea/InspirationFor this project, I took inspiration from the CaryKH's videoJumpcutter.
This project does not share any source code with his implementation, and is more optimized for my use case (fast and efficient lecture silence removal).ContributingIf you are missing a feature or have new idea, go for it! That is what open-source is for! 😃AuthorTim-Luca Lagmöller(@lagmoellertim)Donations / SponsorsI'm part of the official GitHub Sponsors program where you can support me on a monthly basis.You can also contribute by buying me a coffee (this is a one-time donation).Thank you for your support!LicenseThe Code is licensed under theMIT LicenseCopyright © 2019-present,Tim-Luca LagmöllerAll used videos are licensed under theCreative Commons BY-NC-SA LicenseHave fun :tada: