This repository has been archived on 2025-09-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
audio-summarize/setup.sh
2024-08-13 20:32:46 +02:00

32 lines
606 B
Bash
Executable file

#!/usr/bin/env bash
# init
oldcwd=$(pwd)
function cleanup {
cd ${oldcwd}
}
trap cleanup EXIT
export root_dir=$(realpath $(dirname $0))
export vendor_dir=${root_dir}/vendor
# Prepare installation of dependencies
mkdir -p ${vendor_dir}
cd ${vendor_dir}
# Install whisper.cpp
if [ ! -d ./whisper.cpp ]; then
git clone -b v1.6.2 https://github.com/ggerganov/whisper.cpp.git
fi
cd whisper.cpp
make
cd ${vendor_dir}
# Install python packages
if ! python3 -m pip install -r "${root_dir}/requirements.txt"; then
echo
echo "Make shure to run this script in a python virtual environment!"
fi