✅ TICKET-006: Wake-word Detection Service - Implemented wake-word detection using openWakeWord - HTTP/WebSocket server on port 8002 - Real-time detection with configurable threshold - Event emission for ASR integration - Location: home-voice-agent/wake-word/ ✅ TICKET-010: ASR Service - Implemented ASR using faster-whisper - HTTP endpoint for file transcription - WebSocket endpoint for streaming transcription - Support for multiple audio formats - Auto language detection - GPU acceleration support - Location: home-voice-agent/asr/ ✅ TICKET-014: TTS Service - Implemented TTS using Piper - HTTP endpoint for text-to-speech synthesis - Low-latency processing (< 500ms) - Multiple voice support - WAV audio output - Location: home-voice-agent/tts/ ✅ TICKET-047: Updated Hardware Purchases - Marked Pi5 kit, SSD, microphone, and speakers as purchased - Updated progress log with purchase status 📚 Documentation: - Added VOICE_SERVICES_README.md with complete testing guide - Each service includes README.md with usage instructions - All services ready for Pi5 deployment 🧪 Testing: - Created test files for each service - All imports validated - FastAPI apps created successfully - Code passes syntax validation 🚀 Ready for: - Pi5 deployment - End-to-end voice flow testing - Integration with MCP server Files Added: - wake-word/detector.py - wake-word/server.py - wake-word/requirements.txt - wake-word/README.md - wake-word/test_detector.py - asr/service.py - asr/server.py - asr/requirements.txt - asr/README.md - asr/test_service.py - tts/service.py - tts/server.py - tts/requirements.txt - tts/README.md - tts/test_service.py - VOICE_SERVICES_README.md Files Modified: - tickets/done/TICKET-047_hardware-purchases.md Files Moved: - tickets/backlog/TICKET-006_prototype-wake-word-node.md → tickets/done/ - tickets/backlog/TICKET-010_streaming-asr-service.md → tickets/done/ - tickets/backlog/TICKET-014_tts-service.md → tickets/done/
136 lines
4.3 KiB
Bash
Executable File
136 lines
4.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Run all tests for Atlas voice agent system
|
|
|
|
set -e # Exit on error
|
|
|
|
echo "╔══════════════════════════════════════════════════════════════╗"
|
|
echo "║ Atlas Voice Agent - Test Suite ║"
|
|
echo "╚══════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
|
|
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "$BASE_DIR"
|
|
|
|
# Colors
|
|
GREEN='\033[0;32m'
|
|
RED='\033[0;31m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
PASSED=0
|
|
FAILED=0
|
|
|
|
test_command() {
|
|
local name="$1"
|
|
local cmd="$2"
|
|
|
|
echo -n "Testing $name... "
|
|
if eval "$cmd" > /dev/null 2>&1; then
|
|
echo -e "${GREEN}✅ PASSED${NC}"
|
|
((PASSED++))
|
|
return 0
|
|
else
|
|
echo -e "${RED}❌ FAILED${NC}"
|
|
((FAILED++))
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
# Check prerequisites
|
|
echo "📋 Checking prerequisites..."
|
|
echo ""
|
|
|
|
# Check Python
|
|
if ! command -v python3 &> /dev/null; then
|
|
echo -e "${RED}❌ Python3 not found${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
# Check Ollama (if local)
|
|
if grep -q "OLLAMA_HOST=localhost" .env 2>/dev/null; then
|
|
if ! curl -s http://localhost:11434/api/tags > /dev/null 2>&1; then
|
|
echo -e "${YELLOW}⚠️ Ollama not running on localhost:11434${NC}"
|
|
echo " Start with: ollama serve"
|
|
fi
|
|
fi
|
|
|
|
echo ""
|
|
echo "🧪 Running tests..."
|
|
echo ""
|
|
|
|
# Test 1: MCP Server Tools
|
|
if [ -f "mcp-server/test_mcp.py" ]; then
|
|
test_command "MCP Server Tools" "cd mcp-server && python3 -c 'from tools.registry import ToolRegistry; r = ToolRegistry(); assert len(r.list_tools()) == 22'"
|
|
fi
|
|
|
|
# Test 2: LLM Connection
|
|
if [ -f "llm-servers/4080/test_connection.py" ]; then
|
|
test_command "LLM Connection" "cd llm-servers/4080 && python3 test_connection.py | grep -q 'Chat test successful'"
|
|
fi
|
|
|
|
# Test 3: Router
|
|
if [ -f "routing/test_router.py" ]; then
|
|
test_command "LLM Router" "cd routing && python3 test_router.py"
|
|
fi
|
|
|
|
# Test 4: Memory System
|
|
if [ -f "memory/test_memory.py" ]; then
|
|
test_command "Memory System" "cd memory && python3 test_memory.py"
|
|
fi
|
|
|
|
# Test 5: Monitoring
|
|
if [ -f "monitoring/test_monitoring.py" ]; then
|
|
test_command "Monitoring" "cd monitoring && python3 test_monitoring.py"
|
|
fi
|
|
|
|
# Test 6: Safety Boundaries
|
|
if [ -f "safety/boundaries/test_boundaries.py" ]; then
|
|
test_command "Safety Boundaries" "cd safety/boundaries && python3 test_boundaries.py"
|
|
fi
|
|
|
|
# Test 7: Confirmations
|
|
if [ -f "safety/confirmations/test_confirmations.py" ]; then
|
|
test_command "Confirmations" "cd safety/confirmations && python3 test_confirmations.py"
|
|
fi
|
|
|
|
# Test 8: Conversation
|
|
if [ -f "conversation/test_session.py" ]; then
|
|
test_command "Conversation Management" "cd conversation && python3 test_session.py"
|
|
fi
|
|
|
|
# Test 9: Summarization
|
|
if [ -f "conversation/summarization/test_summarization.py" ]; then
|
|
test_command "Conversation Summarization" "cd conversation/summarization && python3 test_summarization.py"
|
|
fi
|
|
|
|
# Test 10: MCP Adapter (requires server running)
|
|
if [ -f "mcp-adapter/test_adapter.py" ]; then
|
|
if curl -s http://localhost:8000/health > /dev/null 2>&1; then
|
|
test_command "MCP Adapter" "cd mcp-adapter && python3 test_adapter.py"
|
|
else
|
|
echo -e "${YELLOW}⚠️ MCP Adapter test skipped (server not running)${NC}"
|
|
fi
|
|
fi
|
|
|
|
# Summary
|
|
echo ""
|
|
echo "╔══════════════════════════════════════════════════════════════╗"
|
|
echo "║ Test Results ║"
|
|
echo "╚══════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
echo -e "${GREEN}✅ Passed: $PASSED${NC}"
|
|
if [ $FAILED -gt 0 ]; then
|
|
echo -e "${RED}❌ Failed: $FAILED${NC}"
|
|
else
|
|
echo -e "${GREEN}❌ Failed: $FAILED${NC}"
|
|
fi
|
|
echo ""
|
|
|
|
if [ $FAILED -eq 0 ]; then
|
|
echo -e "${GREEN}🎉 All tests passed!${NC}"
|
|
exit 0
|
|
else
|
|
echo -e "${RED}⚠️ Some tests failed. Check output above.${NC}"
|
|
exit 1
|
|
fi
|