# Kabras ASR Research
Research and analysis companion to the
kabras-ai-project app.
Computes Word Error Rate (WER), confidence statistics, and visualisations
from the translation logs produced by the main app. Designed to support
ongoing improvement of the Kabras language lexicon and ASR pipeline.
## Project structure
```
kabras-asr-research/
├── analysis/
│ ├── stats.py # Summary statistics (match rate, avg confidence, WER)
│ ├── visualize.py # Saves confidence & WER plots to analysis/plots/
│ └── plots/ # Auto-generated plot images
├── notebooks/
│ ├── wer_analysis.ipynb # Computes WER, writes results back to CSV
│ └── confidence_plots.ipynb # Visualisations (run after wer_analysis)
├── datasets/ # Local research datasets (not tracked by git)
├── config.py # Central path configuration — edit LOG_PATH here
├── requirements.txt
└── README.md
```
## Setup
```bash
git clone
github.com
cd kabras-asr-research
python -m venv venv
venv\Scripts\activate # Windows
pip install -r requirements.txt
```
## Configuration
Open `config.py` and set `LOG_PATH` to point to the CSV written by the
kabras-ai-project app:
```python
LOG_PATH = r"C:\Users\YOU\MyProjects\kabras-ai-project\app\datasets\translations_log.csv"
```
## Usage
### 1. Run the Kabras AI app first
Make at least one translation at
127.0.0.1
to generate `translations_log.csv`.
### 2. Print statistics
```bash
python analysis/stats.py
```
### 3. Generate and save plots
```bash
python analysis/visualize.py
```
Plots are saved to `analysis/plots/`.
### 4. Run notebooks (in order)
```bash
jupyter lab
```
- Open `notebooks/wer_analysis.ipynb` → Run All
- Open `notebooks/confidence_plots.ipynb` → Run All
## Data flow
```
kabras-ai-project app
│
│ writes translations_log.csv on every translation
▼
kabras-asr-research
wer_analysis.ipynb → adds WER + CalcConfidence columns to C …