# Audio analysis (internal)

Acoustic Librosa scoring runs via `AudioAnalysisService` internally.
There is **no** public `/audio-analysis` or `/confidence-scoring` HTTP route.
`CommunicationAnalysisService` can still merge text communication + optional
audio/delivery/confidence for callers that import the service (e.g. final-evaluation
when Platform does not supply media evidence).

## Public surface

Speech/comms scores belong in Platform → `POST /interviews/final-evaluation`
`media_evidence.communication_analysis` / `audio_analysis` payloads.
Do not call removed endpoints:

- ~~`POST /communication-analysis`~~
- ~~`POST /audio-analysis/analyze`~~
- ~~`POST /confidence-scoring/evaluate`~~

## Service pipeline (when invoked)

1. Optional audio load → Librosa features + delivery/confidence (one pass)
2. One text communication LLM/local score using the same transcript
3. Merge delivery gaps into actionable feedback (no second GPT for confidence)

**Confidence indicators** are evidence-based delivery cues from audio only — never
inferred from text alone, and not proof of psychological confidence.

## Setup

- System: `ffmpeg`
- Python: `librosa`, `soundfile`, `numpy` (see `requirements.txt`)

## Tests

```bash
pytest tests/test_audio_analysis.py tests/test_voice_analysis.py -q
```

HTTP communication tests are skipped/removed; prefer service-level tests.
