"""Shared type definitions for VoxCast services."""
from __future__ import annotations

from enum import StrEnum
from typing import TypedDict


class AppState(StrEnum):
    """Application state machine states."""
    IDLE = "idle"
    LOADING = "loading"
    LISTENING = "listening"
    TRANSCRIBING = "transcribing"
    CORRECTING = "correcting"
    CONVERTING = "converting"
    READY = "ready"
    ERROR = "error"


class AudioDevice(TypedDict):
    """Audio input device information."""
    index: int
    name: str
    max_input_channels: int
    default_samplerate: float
    hostapi: int
