139_spanish-voice-trainer/main.py

33 lines
1 KiB
Python
Raw Permalink Normal View History

2026-06-12 11:58:47 +00:00
# main.py
import sys
2026-06-13 02:03:58 +00:00
import asyncio
2026-06-12 11:58:47 +00:00
from database.connection import init_db
2026-06-13 02:03:58 +00:00
from core.phrase_manager import PhraseManager
2026-06-12 11:58:47 +00:00
2026-06-13 02:03:58 +00:00
async def test_pipeline():
print("🚀 Booting Castilian Voice Trainer Ingestion Engine...")
2026-06-12 11:58:47 +00:00
2026-06-13 02:03:58 +00:00
# Ensure database is present
2026-06-12 11:58:47 +00:00
init_db()
2026-06-13 02:03:58 +00:00
# Initialize the phrase controller manager
manager = PhraseManager()
2026-06-12 11:58:47 +00:00
2026-06-13 02:03:58 +00:00
# Test Entry: Let's log an authentic textbook phrase from Aula Internacional
print("\n📥 Processing sample entry...")
success = await manager.add_translation_pair(
spanish_text="¿Cómo se pronuncia esta palabra?",
english_text="How do you pronounce this word?",
textbook="Aula Internacional 1 Plus",
unit=2,
context="Glossary / Lesson Terms",
voice_gender="female" # Let's verify Elvira's voice on this one!
)
if success:
print("\n🎉 Verification Phase 1 Pipeline Test complete!")
else:
print("\n⚠️ Pipeline processing failed.")
2026-06-12 11:58:47 +00:00
if __name__ == "__main__":
2026-06-13 02:03:58 +00:00
asyncio.run(test_pipeline())