# kamulugariabhinav-cmd/fieldproj-v2 architecture

> Architecture diagram of the GitHub repository kamulugariabhinav-cmd/fieldproj-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kamulugariabhinav-cmd/fieldproj-v2
- Repository: https://github.com/kamulugariabhinav-cmd/fieldproj-v2

## Overview

VoiceGuard V2 is an experimental web application for analyzing audio for possible synthetic speech. Users sign in, submit a recording through the dashboard, and receive a model-generated result when inference is available. The documented analysis path includes audio preprocessing, model selection, inference, and result presentation; the backend excerpt also shows a separate Forensics option. Firebase authentication and external detection providers are additional capabilities. The graph follows documented or excerpted relationships; unsampled frontend and backend wiring is not inferred.

Main entry points: [`backend/app.py`](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/app.py) (FastAPI endpoints), [`backend/detector.py`](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/detector.py) (Multi-model detector), [`voiceguard.js`](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/voiceguard.js) (Frontend logic), [`backend/external_api.py`](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/external_api.py) (External API manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_dashboard["Dashboard UI<br/>[index.html]"]
  node_frontend_logic["Frontend logic<br/>[voiceguard.js]"]
  node_auth["Firebase authentication<br/>[voiceguard.js]"]
end

subgraph group_api["Inference API"]
  node_inference_api["FastAPI endpoints<br/>[app.py]"]
  node_audio["Audio preprocessing<br/>[audio_processor.py]"]
end

subgraph group_models["Detection models"]
  node_registry["Model registry<br/>[registry.py]"]
  node_detector["Multi-model detector<br/>[detector.py]"]
  node_aasist["AASIST model<br/>[aasist.py]"]
  node_rawnet["RawNet2 model<br/>[rawnet2.py]"]
  node_prosdd_engine["ProSDD inference<br/>[prosdd_epoch4.py]"]
  node_prosdd_arch["ProSDD architecture"]
  node_forensics_engine["Forensics inference"]
  node_forensics_arch["Forensics architecture<br/>[model.py]"]
end

subgraph group_integrations["External integrations"]
  node_external_manager["External API manager<br/>[external_api.py]"]
  node_hive{{"Hive AI"}}
  node_resemble{{"Resemble AI"}}
end

node_user(("User"))
node_firebase{{"Firebase Auth"}}

node_user -->|"submits audio"| node_dashboard
node_dashboard -->|"uses interactions"| node_frontend_logic
node_frontend_logic -->|"signs in"| node_auth
node_auth -->|"authenticates with"| node_firebase
node_frontend_logic -->|"sends audio"| node_inference_api
node_inference_api -->|"preprocesses audio"| node_audio
node_inference_api -->|"runs inference"| node_prosdd_engine
node_inference_api -->|"loads detector"| node_forensics_engine
node_detector -->|"checks model status"| node_registry
node_registry -.->|"references integration"| node_external_manager
node_prosdd_engine -->|"instantiates model"| node_prosdd_arch
node_forensics_engine -->|"instantiates model"| node_forensics_arch
node_external_manager -->|"calls provider"| node_hive
node_external_manager -->|"calls provider"| node_resemble
node_inference_api -->|"returns results"| node_dashboard
node_detector -.->|"supports model"| node_aasist
node_detector -.->|"supports model"| node_rawnet

click node_dashboard "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/index.html"
click node_frontend_logic "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/voiceguard.js"
click node_auth "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/voiceguard.js"
click node_inference_api "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/app.py"
click node_audio "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/audio_processor.py"
click node_registry "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/registry.py"
click node_detector "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/detector.py"
click node_aasist "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/aasist.py"
click node_rawnet "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/rawnet2.py"
click node_prosdd_engine "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/prosdd/prosdd_epoch4.py"
click node_prosdd_arch "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/prosdd/model_stage2realfake.py"
click node_forensics_engine "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/forensics/forensics_detector.py"
click node_forensics_arch "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/forensics/model.py"
click node_external_manager "https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/external_api.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_frontend_logic,node_auth,node_user toneBlue
class node_inference_api,node_audio toneAmber
class node_registry,node_detector,node_aasist,node_rawnet,node_prosdd_engine,node_prosdd_arch,node_forensics_engine,node_forensics_arch toneMint
class node_external_manager,node_hive,node_resemble toneRose
class node_firebase toneIndigo
```

## Components

### Web application

- [Dashboard UI](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/index.html): `index.html`
- [Frontend logic](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/voiceguard.js): `voiceguard.js`
- [Firebase authentication](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/voiceguard.js): `voiceguard.js`

### Inference API

- [FastAPI endpoints](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/app.py): `backend/app.py`
- [Audio preprocessing](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/audio_processor.py): `backend/audio_processor.py`

### Detection models

- [Model registry](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/registry.py): `backend/models/registry.py`
- [Multi-model detector](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/detector.py): `backend/detector.py`
- [AASIST model](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/aasist.py): `backend/models/aasist.py`
- [RawNet2 model](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/rawnet2.py): `backend/models/rawnet2.py`
- [ProSDD inference](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/prosdd/prosdd_epoch4.py): `backend/models/prosdd/prosdd_epoch4.py`
- [ProSDD architecture](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/prosdd/model_stage2realfake.py): `backend/models/prosdd/model_stage2realfake.py`
- [Forensics inference](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/forensics/forensics_detector.py): `backend/models/forensics/forensics_detector.py`
- [Forensics architecture](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/models/forensics/model.py): `backend/models/forensics/model.py`

### External integrations

- [External API manager](https://github.com/kamulugariabhinav-cmd/fieldproj-v2/blob/main/backend/external_api.py): `backend/external_api.py`
- **Hive AI**
- **Resemble AI**

### Other components

- **User**
- **Firebase Auth**

## Connections

- User → Dashboard UI: submits audio (evidence: `README.md`)
- Dashboard UI → Frontend logic: uses interactions (evidence: `README.md`)
- Frontend logic → Firebase authentication: signs in (evidence: `README.md`)
- Firebase authentication → Firebase Auth: authenticates with (evidence: `README.md`)
- Frontend logic → FastAPI endpoints: sends audio (evidence: `README.md`)
- FastAPI endpoints → Audio preprocessing: preprocesses audio (evidence: `README.md`)
- FastAPI endpoints → ProSDD inference: runs inference (evidence: `backend/app.py`)
- FastAPI endpoints → Forensics inference: loads detector (evidence: `backend/app.py`)
- Multi-model detector → Model registry: checks model status (evidence: `backend/detector.py`)
- Model registry → External API manager: references integration (evidence: `backend/models/registry.py`)
- ProSDD inference → ProSDD architecture: instantiates model (evidence: `backend/models/prosdd/prosdd_epoch4.py`)
- Forensics inference → Forensics architecture: instantiates model (evidence: `backend/models/forensics/forensics_detector.py`)
- External API manager → Hive AI: calls provider (evidence: `backend/external_api.py`)
- External API manager → Resemble AI: calls provider (evidence: `backend/external_api.py`)
- FastAPI endpoints → Dashboard UI: returns results (evidence: `README.md`)
- Multi-model detector → AASIST model: supports model (evidence: `backend/detector.py`)
- Multi-model detector → RawNet2 model: supports model (evidence: `backend/detector.py`)
