init: scripts diversos (crawlers, conversores, scrapers)
This commit is contained in:
43
tts-generator/teste_nova_chave_gemini.sh
Executable file
43
tts-generator/teste_nova_chave_gemini.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
# teste_nova_chave_gemini.sh
|
||||
# Author: Descomplicar® Crescimento Digital
|
||||
# Link: https://descomplicar.pt
|
||||
# Copyright: 2025 Descomplicar®
|
||||
|
||||
|
||||
# Teste rápido da nova chave Google Gemini
|
||||
echo "🎯 Testando nova chave Google Gemini..."
|
||||
|
||||
# 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
|
||||
|
||||
# Ativar ambiente virtual se existir
|
||||
if [ -d "venv" ]; then
|
||||
echo "🔄 Ativando ambiente virtual..."
|
||||
source venv/bin/activate
|
||||
fi
|
||||
|
||||
# Verificar se google-genai está instalado
|
||||
echo "📦 Verificando dependências..."
|
||||
python -c "import google.genai" 2>/dev/null || {
|
||||
echo "📦 Instalando google-genai..."
|
||||
pip install google-genai
|
||||
}
|
||||
|
||||
# Executar teste pequeno primeiro
|
||||
echo "🧪 Executando teste com texto pequeno..."
|
||||
python gemini_tts_teste.py
|
||||
|
||||
echo ""
|
||||
echo "📁 Ficheiros gerados:"
|
||||
ls -la *.wav 2>/dev/null || echo "❌ Nenhum ficheiro WAV encontrado"
|
||||
|
||||
echo ""
|
||||
echo "🎯 Se funcionou, execute o completo com:"
|
||||
echo "./run_gemini_tts_venv.sh"
|
||||
Reference in New Issue
Block a user