# main.py import sys import asyncio from database.connection import init_db from core.phrase_manager import PhraseManager async def test_pipeline(): print("🚀 Booting Castilian Voice Trainer Ingestion Engine...") # Ensure database is present init_db() # Initialize the phrase controller manager manager = PhraseManager() # 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.") if __name__ == "__main__": asyncio.run(test_pipeline())