#!/usr/bin/env python3
"""Test import of asr_processor module."""

import sys
import os

sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))

try:
    # Import the module but not execute main
    import scripts.asr_processor as asr

    print("SUCCESS: asr_processor imported")
    # Check functions exist
    required = [
        "has_audio_stream",
        "get_media_duration",
        "extract_audio",
        "extract_chunk",
        "monitor_resources",
        "transcribe_direct",
        "transcribe_chunk",
        "run_asr",
    ]
    for func in required:
        if hasattr(asr, func):
            print(f"  ✓ {func}")
        else:
            print(f"  ✗ {func} missing")
except Exception as e:
    print(f"FAILED: {e}")
    import traceback

    traceback.print_exc()
    sys.exit(1)
