|
| 1 | +#!/usr/bin/env python3 |
| 2 | +""" |
| 3 | +Coffee Barista Voice Agent - Original Reference Implementation |
| 4 | +
|
| 5 | +📚 REFERENCE VERSION - MONOLITHIC IMPLEMENTATION (1109 lines) |
| 6 | +
|
| 7 | +This is the ORIGINAL single-file implementation of the Coffee Barista Voice Agent. |
| 8 | +It has been preserved as a reference while a refactored modular version has been created. |
| 9 | +
|
| 10 | +STATUS: |
| 11 | +- ✅ Fully functional and battle-tested |
| 12 | +- 📖 Preserved for reference and stability |
| 13 | +- 🔒 No longer actively developed (use refactored version for new features) |
| 14 | +
|
| 15 | +ARCHITECTURE: |
| 16 | +- Monolithic: All logic in one file (StateManager + CoffeeBaristaAgent + tools) |
| 17 | +- Proven: Extensively tested implementation |
| 18 | +- Complete: Contains all original functionality |
| 19 | +
|
| 20 | +REFACTORED VERSION: |
| 21 | +For new development, use the modular refactored version: |
| 22 | +- Entry Point: main.py |
| 23 | +- Launcher: ./run_main.sh |
| 24 | +- Structure: Organized into state/, agents/, tools/, config/, utils/ |
| 25 | +- Benefits: Better maintainability, easier testing, cleaner separation |
| 26 | +
|
| 27 | +USAGE: |
| 28 | +- Console Mode: ./run_voice_agent_original.sh |
| 29 | +- Features: Wake word, voice conversation, emotion processing, virtual requests |
| 30 | +- Requirements: OPENAI_API_KEY, optional PORCUPINE_ACCESS_KEY |
| 31 | +
|
| 32 | +COMPARISON: |
| 33 | +┌─────────────────────┬─────────────────────┬─────────────────────┐ |
| 34 | +│ ASPECT │ ORIGINAL (THIS) │ REFACTORED │ |
| 35 | +├─────────────────────┼─────────────────────┼─────────────────────┤ |
| 36 | +│ File Count │ 1 monolithic file │ 7 focused files │ |
| 37 | +│ Lines of Code │ 1109 lines │ ~200 lines avg │ |
| 38 | +│ Maintainability │ Harder to navigate │ Easy to find logic │ |
| 39 | +│ Testing │ Integration only │ Unit + Integration │ |
| 40 | +│ Feature Addition │ Search entire file │ Edit specific file │ |
| 41 | +│ Code Reviews │ Large diffs │ Focused diffs │ |
| 42 | +│ Development │ Single developer │ Parallel teams │ |
| 43 | +│ Learning Curve │ See everything │ Understand modules │ |
| 44 | +│ Stability │ Battle-tested │ Same functionality │ |
| 45 | +└─────────────────────┴─────────────────────┴─────────────────────┘ |
| 46 | +
|
| 47 | +ORIGINAL AUTHOR: Coffee Buddy Team |
| 48 | +REFACTORING DATE: July 2025 |
| 49 | +PRESERVED: All original functionality and behavior |
| 50 | +""" |
| 51 | + |
1 | 52 | import asyncio |
2 | 53 | import logging |
3 | 54 | import os |
|
0 commit comments