#!/bin/bash # Test CLI Processors set -e # Configuration OUTPUT_DIR="/Users/accusys/momentry/output" TEST_UUID="test_cli_$(date +%s)" SWIFT_CLI="/Users/accusys/momentry_core/scripts/swift_processors/.build/release" RUST_CLI="/Users/accusys/momentry_core/scripts/rust_processors/target/release" # Test video (use existing test file if available) TEST_VIDEO="/Users/accusys/momentry/output/020.mp4" if [ ! -f "$TEST_VIDEO" ]; then echo "❌ Test video not found: $TEST_VIDEO" echo "Please specify a test video file" exit 1 fi echo "=== CLI Processor Test ===" echo "Test UUID: $TEST_UUID" echo "Test Video: $TEST_VIDEO" echo "" # Test 1: ASR echo "【Test 1: ASR】" if [ -x "$SWIFT_CLI/asr_swift" ]; then echo "✅ asr_swift available" echo "Command: $SWIFT_CLI/asr_swift $TEST_VIDEO $OUTPUT_DIR/${TEST_UUID}.asr.json --uuid $TEST_UUID" else echo "❌ asr_swift not found" fi echo "" # Test 2: Face echo "【Test 2: Face】" if [ -x "$SWIFT_CLI/swift_face" ]; then echo "✅ swift_face available" echo "Command: $SWIFT_CLI/swift_face $TEST_VIDEO $OUTPUT_DIR/${TEST_UUID}.face.json --uuid $TEST_UUID" else echo "❌ swift_face not found" fi echo "" # Test 3: OCR echo "【Test 3: OCR】" if [ -x "$SWIFT_CLI/swift_ocr" ]; then echo "✅ swift_ocr available" echo "Command: $SWIFT_CLI/swift_ocr $TEST_VIDEO $OUTPUT_DIR/${TEST_UUID}.ocr.json --uuid $TEST_UUID" else echo "❌ swift_ocr not found" fi echo "" # Test 4: Face Embedding echo "【Test 4: Face Embedding】" if [ -x "$SWIFT_CLI/facenet_embedding" ]; then echo "✅ facenet_embedding available" echo "Command: $SWIFT_CLI/facenet_embedding $TEST_VIDEO $OUTPUT_DIR/${TEST_UUID}.face.json $OUTPUT_DIR/${TEST_UUID}.face_embedding.json --uuid $TEST_UUID" else echo "❌ facenet_embedding not found" fi echo "" # Test 5: ASRX echo "【Test 5: ASRX】" if [ -x "$SWIFT_CLI/asrx_swift" ]; then echo "✅ asrx_swift available" echo "Command: $SWIFT_CLI/asrx_swift $TEST_VIDEO $OUTPUT_DIR/${TEST_UUID}.asrx.json --uuid $TEST_UUID" else echo "❌ asrx_swift not found" fi echo "" # Summary echo "=== Test Summary ===" echo "✅ Available CLI tools:" ls -1 "$SWIFT_CLI" 2>/dev/null | grep -E "^swift_|^asr_|^asrx_|^facenet_" | while read tool; do echo " - $tool" done echo "" echo "Next steps:" echo "1. Run individual CLI tests (uncomment commands in this script)" echo "2. Compare outputs with Python versions" echo "3. Test full pipeline with CLI orchestration"