init: scripts diversos (crawlers, conversores, scrapers)
This commit is contained in:
42
tts-generator/run_gemini_tts.sh
Executable file
42
tts-generator/run_gemini_tts.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
# run_gemini_tts.sh
|
||||
# Author: Descomplicar® Crescimento Digital
|
||||
# Link: https://descomplicar.pt
|
||||
# Copyright: 2025 Descomplicar®
|
||||
|
||||
|
||||
# Script para configurar e executar o Gerador de Voz da Descomplicar
|
||||
# Usage: ./run_gemini_tts.sh
|
||||
|
||||
echo "🎙️ Configurando Gerador de Voz da Descomplicar..."
|
||||
|
||||
# Carregar API Key do .env
|
||||
if [ -f .env ]; then
|
||||
export $(grep -v '^#' .env | xargs)
|
||||
fi
|
||||
if [ -z "$GEMINI_API_KEY" ]; then
|
||||
echo "ERRO: GEMINI_API_KEY nao configurada! Criar .env com GEMINI_API_KEY=..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verificar se Python está instalado
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
echo "❌ Python3 não encontrado. Por favor, instale o Python 3.8+"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verificar se pip está instalado
|
||||
if ! command -v pip &> /dev/null; then
|
||||
echo "❌ pip não encontrado. Por favor, instale o pip"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Instalar dependências
|
||||
echo "📦 Instalando dependências..."
|
||||
pip install google-genai
|
||||
|
||||
# Executar o script
|
||||
echo "🚀 Iniciando geração de áudio..."
|
||||
python3 gemini_tts.py
|
||||
|
||||
echo "✅ Processo concluído! Verifique os ficheiros de áudio gerados."
|
||||
Reference in New Issue
Block a user