# shubhgit-hub/ai-voice-assistant-theraphy architecture

> Architecture diagram of the GitHub repository shubhgit-hub/ai-voice-assistant-theraphy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shubhgit-hub/ai-voice-assistant-theraphy
- Repository: https://github.com/shubhgit-hub/ai-voice-assistant-theraphy

## Overview

VoiceRx is a single-file Streamlit speech therapy application. Its main workflow takes a user recording through audio preparation, Whisper transcription, pronunciation scoring and feedback; the app also provides voice analysis, visualizations, adaptive and tongue-twister exercises, synthesized playback, progress tracking and AI coaching. The source excerpt is partial, so links for unsampled UI wiring and state handling are omitted; feature coverage also reflects the README.

Main entry points: [`ai_assistant.py`](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py) (Streamlit application), [`temp.wav`](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/temp.wav) (Temporary audio)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_practice["Practice and capture"]
  node_recording["Audio recording<br/>[ai_assistant.py]"]
  node_exercise["Adaptive exercises<br/>[ai_assistant.py]"]
  node_tongue["Tongue twisters<br/>[ai_assistant.py]"]
  node_playback["Exercise playback<br/>[ai_assistant.py]"]
end

subgraph group_analysis["Speech analysis"]
  node_audio["Audio preparation<br/>[ai_assistant.py]"]
  node_whisper["Whisper transcription<br/>[ai_assistant.py]"]
  node_scoring["Pronunciation scoring<br/>[ai_assistant.py]"]
  node_voice["Pitch and energy<br/>[ai_assistant.py]"]
  node_visuals["Audio visualizations<br/>[ai_assistant.py]"]
end

subgraph group_coaching["Coaching and progress"]
  node_feedback["Speech feedback<br/>[ai_assistant.py]"]
  node_history["Session progress<br/>[ai_assistant.py]"]
  node_coach["AI coach<br/>[ai_assistant.py]"]
end

subgraph group_interface["Application interface"]
  node_app["Streamlit application<br/>[ai_assistant.py]"]
end

node_user(("Speaker"))
node_claude["Anthropic API"]
node_audiofile["Temporary audio<br/>[temp.wav]"]

node_user -->|"uses"| node_app
node_app -->|"captures speech"| node_recording
node_recording -->|"prepares audio"| node_audio
node_audio -->|"transcribes"| node_whisper
node_whisper -->|"compares transcript"| node_scoring
node_scoring -->|"scores pronunciation"| node_feedback
node_app -->|"analyzes voice"| node_voice
node_app -->|"renders plots"| node_visuals
node_app -->|"selects practice"| node_exercise
node_app -->|"offers practice"| node_tongue
node_app -->|"plays exercise"| node_playback
node_app -->|"tracks sessions"| node_history
node_app -->|"requests advice"| node_coach
node_coach -->|"reads history"| node_history
node_coach -.->|"requests coaching"| node_claude
node_app -->|"stores audio"| node_audiofile

click node_app "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_recording "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_audio "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_whisper "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_scoring "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_voice "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_visuals "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_exercise "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_tongue "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_playback "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_feedback "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_history "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_coach "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py"
click node_audiofile "https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/temp.wav"

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_recording,node_exercise,node_tongue,node_playback toneBlue
class node_audio,node_whisper,node_scoring,node_voice,node_visuals toneAmber
class node_feedback,node_history,node_coach,node_claude toneMint
class node_app toneRose
class node_user toneIndigo
class node_audiofile toneTeal
```

## Components

### Practice and capture

- [Audio recording](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Adaptive exercises](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Tongue twisters](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Exercise playback](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`

### Speech analysis

- [Audio preparation](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Whisper transcription](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Pronunciation scoring](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Pitch and energy](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Audio visualizations](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`

### Coaching and progress

- [Speech feedback](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [Session progress](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`
- [AI coach](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`

### Application interface

- [Streamlit application](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/ai_assistant.py): `ai_assistant.py`

### Other components

- **Speaker**
- **Anthropic API**
- [Temporary audio](https://github.com/shubhgit-hub/ai-voice-assistant-theraphy/blob/main/temp.wav): `temp.wav`

## Connections

- Speaker → Streamlit application: uses
- Streamlit application → Audio recording: captures speech
- Audio recording → Audio preparation: prepares audio
- Audio preparation → Whisper transcription: transcribes
- Whisper transcription → Pronunciation scoring: compares transcript
- Pronunciation scoring → Speech feedback: scores pronunciation
- Streamlit application → Pitch and energy: analyzes voice
- Streamlit application → Audio visualizations: renders plots
- Streamlit application → Adaptive exercises: selects practice
- Streamlit application → Tongue twisters: offers practice
- Streamlit application → Exercise playback: plays exercise
- Streamlit application → Session progress: tracks sessions
- Streamlit application → AI coach: requests advice
- AI coach → Session progress: reads history
- AI coach → Anthropic API: requests coaching
- Streamlit application → Temporary audio: stores audio
