from fastapi import APIRouter
from app.dependencies import get_audio_router

router = APIRouter()

@router.get("/devices")
async def list_devices():
    audio_router = get_audio_router()
    return {
        "inputs": [item.model_dump() for item in await audio_router.list_inputs()],
        "outputs": [item.model_dump() for item in await audio_router.list_outputs()],
    }
