-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
install.sh
30 lines (30 loc) · 1.15 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e
echo "Installing Whisper-TFlite ..."
sudo apt update
sudo apt install -y --no-install-recommends python3-pip python3-dev python3-setuptools python3-wheel python3-venv
sudo apt install -y --no-install-recommends ffmpeg
if [ -d "venv/" ]; then
echo "Activating Python virtual env."
source venv/bin/activate
else
echo "Creating and activating Python virtual env."
python3 -m venv venv && source venv/bin/activate
fi
echo "Installing packages ..."
pip3 install --upgrade pip
pip3 install git+https://github.com/openai/whisper.git
pip3 install tensorflow==2.11.0 tflite==2.10.0 tensorflow_io==0.27.0
echo "Using default 'tflite_runtime' (see 'slim' install for Bazel build) ..."
pip3 install tflite_runtime
echo "Downloading models ..."
mkdir -p models
cd models
if [ ! -f "whisper-tiny.en.tflite" ]; then
wget https://github.com/usefulsensors/openai-whisper/raw/main/models/whisper-tiny.en.tflite
#wget https://github.com/fquirin/speech-recognition-experiments/releases/download/v1.0.0/whisper-tiny.en.tflite
fi
if [ ! -f "whisper-tiny.tflite" ]; then
wget https://github.com/usefulsensors/openai-whisper/raw/main/models/whisper-tiny.tflite
fi
echo "DONE"