# =============================================================================
# requirements.txt – Hugging Face Speech Recognition Starter
# =============================================================================
# Install:  pip install -r requirements.txt
#
# For GPU (CUDA 12.1):
#   pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121
#   then:  pip install -r requirements.txt
# =============================================================================

# ---------------------------------------------------------------------------
# Core ML / Hugging Face
# ---------------------------------------------------------------------------
transformers>=4.40.0          # AutomaticSpeechRecognitionPipeline, Whisper, Wav2Vec2
torch>=2.1.0                  # PyTorch backend (CPU build by default)
torchaudio>=2.1.0             # Optional – used by some transformers audio utilities
accelerate>=0.27.0            # Faster model loading with device_map / from_pretrained helpers

# ---------------------------------------------------------------------------
# Audio processing (required for resampling)
# ---------------------------------------------------------------------------
librosa>=0.10.1               # Audio I/O and resampling (uses soundfile + audioread internally)
soundfile>=0.12.1             # Fast WAV/FLAC I/O (used by librosa)
ffmpeg-python>=0.2.0          # Python bindings for ffmpeg – needed for MP3/OGG decoding
                               # NOTE: also requires the `ffmpeg` system binary to be on PATH.
                               # Install: apt-get install ffmpeg  |  brew install ffmpeg

# ---------------------------------------------------------------------------
# Utility
# ---------------------------------------------------------------------------
numpy>=1.24.0                 # Array operations and audio data handling
pyyaml>=6.0                   # YAML config parsing

# ---------------------------------------------------------------------------
# API (FastAPI + server)
# ---------------------------------------------------------------------------
fastapi>=0.111.0
uvicorn[standard]>=0.29.0     # ASGI server
httpx>=0.27.0                 # Async HTTP client used by FastAPI TestClient
python-multipart>=0.0.9       # Required by FastAPI for file uploads

# ---------------------------------------------------------------------------
# UI
# ---------------------------------------------------------------------------
gradio>=4.36.0                # Web UI (Gradio Blocks interface)

# ---------------------------------------------------------------------------
# Testing
# ---------------------------------------------------------------------------
pytest>=8.0.0
pytest-asyncio>=0.23.0        # Async test support

# ---------------------------------------------------------------------------
# Optional / recommended
# ---------------------------------------------------------------------------
# sentencepiece>=0.2.0         # Required by some multilingual tokenisers (e.g. mBART, T5)
# datasets>=2.19.0             # Load audio benchmark datasets from the HF Hub
# evaluate>=0.4.0              # WER / CER evaluation metrics for ASR
