一款基于FunASR高准确率开源语音识别模型的智能视频剪辑工具。
维石 4ba51acd3e bug fix for en mode | 2 月之前 | |
---|---|---|
docs | 3 月之前 | |
font | 7 月之前 | |
funclip | 2 月之前 | |
.gitignore | 5 月之前 | |
LICENSE | 1 年之前 | |
README.md | 3 月之前 | |
README_zh.md | 3 月之前 | |
requirements.txt | 3 月之前 |
「简体中文 | English」
⚡ Open-source, accurate and easy-to-use video clipping tool 🧠 Explore LLM based video clipping with FunClip
FunClip is a fully open-source, locally deployed automated video clipping tool. It leverages Alibaba TONGYI speech lab's open-source FunASR Paraformer series models to perform speech recognition on videos. Then, users can freely choose text segments or speakers from the recognition results and click the clip button to obtain the video clip corresponding to the selected segments (Quick Experience Modelscope⭐ HuggingFace🤗).
python funclip/launch.py -l en
to try.FunClip basic functions rely on a python environment only.
# clone funclip repo
git clone https://github.com/alibaba-damo-academy/FunClip.git
cd FunClip
# install Python requirments
pip install -r ./requirements.txt
If you want to clip video file with embedded subtitles
On Ubuntu
apt-get -y update && apt-get -y install ffmpeg imagemagick
sed -i 's/none/read,write/g' /etc/ImageMagick-6/policy.xml
shell
brew install imagemagick
sed -i 's/none/read,write/g' /usr/local/Cellar/imagemagick/7.1.1-8_1/etc/ImageMagick-7/policy.xml
On Windows
Download and install imagemagick https://imagemagick.org/script/download.php#windows
Find your python install path and change the IMAGEMAGICK_BINARY
to your imagemagick install path in file site-packages\moviepy\config_defaults.py
wget https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ClipVideo/STHeitiMedium.ttc -O font/STHeitiMedium.ttc
You can establish your own FunClip service which is same as Modelscope Space as follow:
python funclip/launch.py
# '-l en' for English audio recognize
# '-p xxx' for setting port number
# '-s True' for establishing service for public accessing
then visit localhost:7860
you will get a Gradio service like below and you can use FunClip following the steps:
Follow the guide below to explore LLM based clipping:
FunClip supports you to recognize and clip with commands:
# step1: Recognize
python funclip/videoclipper.py --stage 1 \
--file examples/2022云栖大会_片段.mp4 \
--output_dir ./output
# now you can find recognition results and entire SRT file in ./output/
# step2: Clip
python funclip/videoclipper.py --stage 2 \
--file examples/2022云栖大会_片段.mp4 \
--output_dir ./output \
--dest_text '我们把它跟乡村振兴去结合起来,利用我们的设计的能力' \
--start_ost 0 \
--end_ost 100 \
--output_file './output/res.mp4'
FunClip is firstly open-sourced bu FunASR team, any useful PR is welcomed.
You can also scan the following DingTalk group or WeChat group QR code to join the community group for communication.
DingTalk group | WeChat group |
---|---|
FunASR hopes to build a bridge between academic research and industrial applications on speech recognition. By supporting the training & finetuning of the industrial-grade speech recognition model released on ModelScope, researchers and developers can conduct research and production of speech recognition models more conveniently, and promote the development of speech recognition ecology. ASR for Fun!