# senthilthangaiah/radio_agent architecture

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

- Interactive diagram: https://gitdiagram.com/senthilthangaiah/radio_agent
- Repository: https://github.com/senthilthangaiah/radio_agent

## Overview

GenAI Radio is a single-file browser app that turns a user's channel and language selections into a spoken news broadcast. The documented workflow is live search, broadcast scripting, then text-to-speech, with a retro radio interface for setup, controls and playback. The README also describes channel and language choices, story and ticker presentation, and word highlighting. No source excerpts were provided, so components and relationships below rely on the README; multiple responsibilities share the single HTML path.

Main entry points: [`genai-news-radio.html`](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html) (Text-to-speech)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_setup["Key setup"]
  node_selections["Channel and language"]
  node_cabinet["Radio cabinet UI"]
end

subgraph group_news["News pipeline"]
  node_search["Live news search"]
  node_search_api{{"OpenAI search API"}}
  node_articulation["Broadcast scripting"]
  node_gpt4o{{"OpenAI GPT-4o"}}
end

subgraph group_broadcast["Broadcast presentation"]
  node_story["Story and ticker"]
  node_speech["Text-to-speech"]
  node_responsivevoice{{"ResponsiveVoice"}}
  node_highlight["Word highlighting"]
end

node_listener(("Listener"))

node_listener -->|"enters key"| node_setup
node_listener -->|"selects options"| node_selections
node_listener -->|"fetches news"| node_search
node_listener -->|"starts broadcast"| node_speech
node_selections -->|"configures search"| node_search
node_setup -->|"provides API key"| node_search_api
node_search -->|"requests live news"| node_search_api
node_search_api -->|"returns raw news"| node_articulation
node_articulation -->|"requests script"| node_gpt4o
node_gpt4o -->|"returns broadcast text"| node_story
node_speech -->|"reads story"| node_story
node_speech -->|"requests speech"| node_responsivevoice
node_speech -->|"times highlights"| node_highlight
node_cabinet -->|"presents radio"| node_listener

click node_setup "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"
click node_selections "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"
click node_cabinet "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"
click node_search "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"
click node_articulation "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"
click node_story "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"
click node_speech "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"
click node_highlight "https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html"

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_setup,node_selections,node_cabinet toneBlue
class node_search,node_search_api,node_articulation,node_gpt4o toneAmber
class node_story,node_speech,node_responsivevoice,node_highlight toneMint
class node_listener toneIndigo
```

## Components

### User interaction

- [Key setup](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`
- [Channel and language](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`
- [Radio cabinet UI](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`

### News pipeline

- [Live news search](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`
- **OpenAI search API**
- [Broadcast scripting](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`
- **OpenAI GPT-4o**

### Broadcast presentation

- [Story and ticker](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`
- [Text-to-speech](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`
- **ResponsiveVoice**
- [Word highlighting](https://github.com/senthilthangaiah/radio_agent/blob/master/genai-news-radio.html): `genai-news-radio.html`

### Other components

- **Listener**

## Connections

- Listener → Key setup: enters key (evidence: `README.md`)
- Listener → Channel and language: selects options (evidence: `README.md`)
- Listener → Live news search: fetches news (evidence: `README.md`)
- Listener → Text-to-speech: starts broadcast (evidence: `README.md`)
- Channel and language → Live news search: configures search (evidence: `README.md`)
- Key setup → OpenAI search API: provides API key (evidence: `README.md`)
- Live news search → OpenAI search API: requests live news (evidence: `README.md`)
- OpenAI search API → Broadcast scripting: returns raw news (evidence: `README.md`)
- Broadcast scripting → OpenAI GPT-4o: requests script (evidence: `README.md`)
- OpenAI GPT-4o → Story and ticker: returns broadcast text (evidence: `README.md`)
- Text-to-speech → Story and ticker: reads story (evidence: `README.md`)
- Text-to-speech → ResponsiveVoice: requests speech (evidence: `README.md`)
- Text-to-speech → Word highlighting: times highlights (evidence: `README.md`)
- Radio cabinet UI → Listener: presents radio (evidence: `README.md`)
