test: add CLI processor test status and script

測試結果:
- ✅ Swift CLI 可用: asr_swift, asrx_swift, swift_face, swift_ocr, facenet_embedding
- ✅ Rust CLI 可用: rust_vad
- ⚠️ 需要構建: swift_pose, swift_hand, rust_face_cluster, rust_appearance, rust_pose

測試腳本:
- test_cli_processors.sh: 檢測 CLI 工具可用性

下一步:
1. 構建缺失的 CLI 工具
2. 實現 CLI orchestration
3. 完整 Pipeline 測試
This commit is contained in:
Accusys
2026-09-27 12:40:28 +08:00
parent 8ec5fc61d8
commit 0e07ab79f6
2 changed files with 271 additions and 0 deletions
+86
View File
@@ -0,0 +1,86 @@
#!/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"