-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·31 lines (23 loc) · 949 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·31 lines (23 loc) · 949 Bytes
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
31
#!/bin/bash
# Script de instalación para realtime_transcribe.py
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
VENV_DIR="${HOME}/virtualenvs/whisper-env"
# Asegurarse de que las dependencias del sistema estén instaladas
echo "Verificando dependencias del sistema..."
sudo apt update
sudo apt install -y python3-venv python3-pip pulseaudio-utils jq curl xdotool ffmpeg
# Crear y configurar entorno virtual
if [[ ! -d "$VENV_DIR" ]]; then
echo "Creando entorno virtual para Whisper..."
python3 -m venv "$VENV_DIR"
fi
# Activar e instalar dependencias
source "$VENV_DIR/bin/activate"
pip install --upgrade pip
pip install faster-whisper torch flask requests python-dotenv
deactivate
echo "Entorno virtual configurado."
# Hacer el script ejecutable
chmod +x "${SCRIPT_DIR}/transcribe.py"
chmod +x "${SCRIPT_DIR}/transcribe.sh"
echo "Instalación completada. Puede ejecutar ./transcribe.sh para comenzar a transcribir."