init: scripts diversos (crawlers, conversores, scrapers)
This commit is contained in:
41
tts-generator/teste_rapido_edge.py
Executable file
41
tts-generator/teste_rapido_edge.py
Executable file
@@ -0,0 +1,41 @@
|
||||
"""
|
||||
teste_rapido_edge.py
|
||||
|
||||
Author: Descomplicar® Crescimento Digital
|
||||
Link: https://descomplicar.pt
|
||||
Copyright: 2025 Descomplicar®
|
||||
"""
|
||||
|
||||
# Edge TTS - Teste rápido corrigido
|
||||
# pip install edge-tts
|
||||
|
||||
import asyncio
|
||||
import edge_tts
|
||||
|
||||
async def gerar_audio_rapido():
|
||||
"""
|
||||
Teste rápido com voz correta
|
||||
"""
|
||||
texto = "Olá, bem-vindos à Descomplicar. Somos uma agência portuguesa de marketing digital que transforma a vossa presença online numa máquina de crescimento."
|
||||
|
||||
# Testar ambas as vozes PT-PT
|
||||
vozes = [
|
||||
("pt-PT-RaquelNeural", "feminina"),
|
||||
("pt-PT-DuarteNeural", "masculina")
|
||||
]
|
||||
|
||||
for voz, genero in vozes:
|
||||
print(f"🎤 Testando voz {genero}: {voz}")
|
||||
|
||||
try:
|
||||
communicate = edge_tts.Communicate(texto, voz)
|
||||
filename = f"teste_{genero}_ptpt.mp3"
|
||||
await communicate.save(filename)
|
||||
|
||||
print(f"✅ Gerado: {filename}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Erro com {voz}: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(gerar_audio_rapido())
|
||||
Reference in New Issue
Block a user