# saadtariq001s/automatic-speech-recognition architecture

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

- Interactive diagram: https://gitdiagram.com/saadtariq001s/automatic-speech-recognition
- Repository: https://github.com/saadtariq001s/automatic-speech-recognition

## Overview

SpeechScribe is a small Gradio application for speech transcription. Users provide audio through either the microphone or file-upload tab; both routes call the same handler, which invokes a Transformers Whisper pipeline and returns transcription text to the interface. The README documents the input modes and transcription capability; the source excerpt shows the wiring. No separate saving or persistence stage is visible in the provided source.

Main entry points: [`app.py`](https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py) (Transcription handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Gradio interface"]
  node_app["Gradio app<br/>[app.py]"]
  node_mic["Microphone input<br/>[app.py]"]
  node_upload["Audio upload<br/>[app.py]"]
  node_result["Transcription text<br/>[app.py]"]
end

subgraph group_recognition["Speech recognition"]
  node_transcribe["Transcription handler<br/>[app.py]"]
  node_whisper["Whisper pipeline<br/>[app.py]"]
end

node_user(("User"))

node_app -->|"registers"| node_mic
node_app -->|"registers"| node_upload
node_user -->|"provides audio"| node_mic
node_user -->|"provides audio"| node_upload
node_mic -->|"dispatches"| node_transcribe
node_upload -->|"dispatches"| node_transcribe
node_transcribe -->|"transcribes audio"| node_whisper
node_transcribe -->|"returns text"| node_result

click node_app "https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py"
click node_mic "https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py"
click node_upload "https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py"
click node_transcribe "https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py"
click node_whisper "https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py"
click node_result "https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.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_app,node_mic,node_upload,node_result,node_user toneBlue
class node_transcribe,node_whisper toneAmber
```

## Components

### Gradio interface

- [Gradio app](https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py): `app.py`
- [Microphone input](https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py): `app.py`
- [Audio upload](https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py): `app.py`
- [Transcription text](https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py): `app.py`

### Speech recognition

- [Transcription handler](https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py): `app.py`
- [Whisper pipeline](https://github.com/saadtariq001s/automatic-speech-recognition/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- Gradio app → Microphone input: registers (evidence: `app.py`)
- Gradio app → Audio upload: registers (evidence: `app.py`)
- User → Microphone input: provides audio (evidence: `app.py`)
- User → Audio upload: provides audio (evidence: `app.py`)
- Microphone input → Transcription handler: dispatches (evidence: `app.py`)
- Audio upload → Transcription handler: dispatches (evidence: `app.py`)
- Transcription handler → Whisper pipeline: transcribes audio (evidence: `app.py`)
- Transcription handler → Transcription text: returns text (evidence: `app.py`)
