# os6/nospeaker architecture

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

- Interactive diagram: https://gitdiagram.com/os6/nospeaker
- Repository: https://github.com/os6/nospeaker

## Overview

NO SPEAKER is a single-file macOS Swift application that turns speech and tones into audible vibration through a Force Touch trackpad, with a terminal-based interactive show. The principal workflow synthesizes speech with macOS, analyzes its audio into formants and pitch, then actuates the trackpad motor; the show also offers a sweep, beat, and touch-play instrument with live terminal visuals. README and excerpts establish these product stages, but omitted portions of the Swift file prevent confirming detailed internal call relationships, so uncertain links are dashed.

Main entry points: [`nospeaker.swift`](https://github.com/os6/nospeaker/blob/main/nospeaker.swift) (Show controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audio["Speech and sound"]
  node_speech["Speech synthesis<br/>[nospeaker.swift]"]
  node_audiofile["Audio buffer<br/>[nospeaker.swift]"]
  node_analysis["Formant analysis<br/>[nospeaker.swift]"]
  node_tones["Tone and sweep<br/>[nospeaker.swift]"]
  node_macsay["macOS say"]
end

subgraph group_haptics["Trackpad output"]
  node_motor["Haptic actuator<br/>[nospeaker.swift]"]
  node_trackpad{{"Force Touch trackpad"}}
  node_multitouch["MultitouchSupport"]
end

subgraph group_show["Interactive show"]
  node_cli["Command options<br/>[nospeaker.swift]"]
  node_showflow["Show controller<br/>[nospeaker.swift]"]
  node_captions["Captions and prompts<br/>[nospeaker.swift]"]
  node_terminal["Terminal renderer<br/>[nospeaker.swift]"]
  node_touch["Touch instrument<br/>[nospeaker.swift]"]
  node_beat["Beat sequencer<br/>[nospeaker.swift]"]
end

node_user(("User"))

node_user -->|"runs"| node_cli
node_cli -.->|"starts show"| node_showflow
node_cli -.->|"requests speech"| node_speech
node_cli -.->|"selects sweep"| node_tones
node_speech -->|"synthesizes with"| node_macsay
node_speech -->|"writes audio"| node_audiofile
node_audiofile -.->|"provides samples"| node_analysis
node_analysis -.->|"drives formants"| node_motor
node_tones -.->|"plays tones"| node_motor
node_motor -.->|"uses API"| node_multitouch
node_multitouch -.->|"actuates"| node_trackpad
node_showflow -.->|"updates prompts"| node_captions
node_showflow -.->|"renders show"| node_terminal
node_showflow -.->|"runs beat"| node_beat
node_showflow -.->|"offers instrument"| node_touch
node_touch -.->|"plays notes"| node_motor

click node_cli "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_showflow "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_captions "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_terminal "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_touch "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_beat "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_speech "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_audiofile "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_analysis "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_tones "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"
click node_motor "https://github.com/os6/nospeaker/blob/main/nospeaker.swift"

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_speech,node_audiofile,node_analysis,node_tones,node_macsay,node_user toneBlue
class node_motor,node_trackpad,node_multitouch toneAmber
class node_cli,node_showflow,node_captions,node_terminal,node_touch,node_beat toneMint
```

## Components

### Speech and sound

- [Speech synthesis](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Audio buffer](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Formant analysis](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Tone and sweep](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- **macOS say**

### Trackpad output

- [Haptic actuator](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- **Force Touch trackpad**
- **MultitouchSupport**

### Interactive show

- [Command options](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Show controller](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Captions and prompts](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Terminal renderer](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Touch instrument](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`
- [Beat sequencer](https://github.com/os6/nospeaker/blob/main/nospeaker.swift): `nospeaker.swift`

### Other components

- **User**

## Connections

- User → Command options: runs (evidence: `README.md`)
- Command options → Show controller: starts show (evidence: `nospeaker.swift`)
- Command options → Speech synthesis: requests speech (evidence: `nospeaker.swift`)
- Command options → Tone and sweep: selects sweep (evidence: `nospeaker.swift`)
- Speech synthesis → macOS say: synthesizes with (evidence: `nospeaker.swift`)
- Speech synthesis → Audio buffer: writes audio (evidence: `nospeaker.swift`)
- Audio buffer → Formant analysis: provides samples (evidence: `nospeaker.swift`)
- Formant analysis → Haptic actuator: drives formants (evidence: `nospeaker.swift`)
- Tone and sweep → Haptic actuator: plays tones (evidence: `nospeaker.swift`)
- Haptic actuator → MultitouchSupport: uses API
- MultitouchSupport → Force Touch trackpad: actuates
- Show controller → Captions and prompts: updates prompts (evidence: `nospeaker.swift`)
- Show controller → Terminal renderer: renders show (evidence: `nospeaker.swift`)
- Show controller → Beat sequencer: runs beat (evidence: `nospeaker.swift`)
- Show controller → Touch instrument: offers instrument (evidence: `nospeaker.swift`)
- Touch instrument → Haptic actuator: plays notes (evidence: `nospeaker.swift`)
