# geovani5410/ne2bu architecture

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

- Interactive diagram: https://gitdiagram.com/geovani5410/ne2bu
- Repository: https://github.com/geovani5410/ne2bu

## Overview

Ne2BU is a ROS 2 voice-assistant application. Its principal workflow is intended to detect a wake word, capture and transcribe speech, generate a response with Llama 3 via Ollama, and speak the result; the LLM node excerpt confirms transcription input and response/microphone-state topics. The README also identifies ROS 2 and Ollama as dependencies. Several feature modules are present, but their wiring is not shown in the available excerpts, so inferred workflow links are dashed and have no evidence path.

Main entry points: [`main/main/llm_node.py`](https://github.com/geovani5410/ne2bu/blob/main/main/main/llm_node.py) (LLM processor), [`main/main/wake_word.py`](https://github.com/geovani5410/ne2bu/blob/main/main/main/wake_word.py) (Wake word), [`main/main/voz_node.py`](https://github.com/geovani5410/ne2bu/blob/main/main/main/voz_node.py) (Speech capture), [`main/main/tts_node.py`](https://github.com/geovani5410/ne2bu/blob/main/main/main/tts_node.py) (Speech output)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Voice interaction"]
  node_wake["Wake word<br/>[wake_word.py]"]
  node_speech["Speech capture<br/>[voz_node.py]"]
  node_tts["Speech output<br/>[tts_node.py]"]
end

subgraph group_dialogue["Dialogue services"]
  node_llm["LLM processor<br/>[llm_node.py]"]
  node_history["Conversation history<br/>[history_node.py]"]
  node_bridge["Bridge node<br/>[bridge_node.py]"]
end

subgraph group_experience["Assistant experience"]
  node_emotion["Emotion handling<br/>[emotion.py]"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_activation["Activation<br/>[activate.py]"]
end

node_user(("User"))
node_ros{{"ROS 2"}}
node_ollama{{"Ollama / Llama 3"}}

node_user -.->|"speaks to"| node_wake
node_wake -.->|"activates"| node_speech
node_speech -.->|"publishes transcription"| node_ros
node_ros -.->|"delivers transcription"| node_llm
node_llm -.->|"requests response"| node_ollama
node_llm -.->|"publishes response"| node_ros
node_ros -.->|"delivers response"| node_tts
node_tts -.->|"speaks response"| node_user
node_ros -.->|"exchanges dialogue data"| node_history
node_ros -.->|"exchanges messages"| node_bridge
node_ros -.->|"exchanges emotion data"| node_emotion
node_ros -.->|"exchanges status"| node_dashboard
node_ros -.->|"exchanges activation state"| node_activation

click node_wake "https://github.com/geovani5410/ne2bu/blob/main/main/main/wake_word.py"
click node_speech "https://github.com/geovani5410/ne2bu/blob/main/main/main/voz_node.py"
click node_llm "https://github.com/geovani5410/ne2bu/blob/main/main/main/llm_node.py"
click node_tts "https://github.com/geovani5410/ne2bu/blob/main/main/main/tts_node.py"
click node_history "https://github.com/geovani5410/ne2bu/blob/main/main/main/history_node.py"
click node_bridge "https://github.com/geovani5410/ne2bu/blob/main/main/main/bridge_node.py"
click node_emotion "https://github.com/geovani5410/ne2bu/blob/main/main/main/emotion.py"
click node_dashboard "https://github.com/geovani5410/ne2bu/blob/main/main/main/dashboard.py"
click node_activation "https://github.com/geovani5410/ne2bu/blob/main/main/main/activate.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_wake,node_speech,node_tts,node_user toneBlue
class node_llm,node_history,node_bridge toneAmber
class node_emotion,node_dashboard,node_activation toneMint
class node_ros,node_ollama toneIndigo
```

## Components

### Voice interaction

- [Wake word](https://github.com/geovani5410/ne2bu/blob/main/main/main/wake_word.py): `main/main/wake_word.py`
- [Speech capture](https://github.com/geovani5410/ne2bu/blob/main/main/main/voz_node.py): `main/main/voz_node.py`
- [Speech output](https://github.com/geovani5410/ne2bu/blob/main/main/main/tts_node.py): `main/main/tts_node.py`

### Dialogue services

- [LLM processor](https://github.com/geovani5410/ne2bu/blob/main/main/main/llm_node.py): `main/main/llm_node.py`
- [Conversation history](https://github.com/geovani5410/ne2bu/blob/main/main/main/history_node.py): `main/main/history_node.py`
- [Bridge node](https://github.com/geovani5410/ne2bu/blob/main/main/main/bridge_node.py): `main/main/bridge_node.py`

### Assistant experience

- [Emotion handling](https://github.com/geovani5410/ne2bu/blob/main/main/main/emotion.py): `main/main/emotion.py`
- [Dashboard](https://github.com/geovani5410/ne2bu/blob/main/main/main/dashboard.py): `main/main/dashboard.py`
- [Activation](https://github.com/geovani5410/ne2bu/blob/main/main/main/activate.py): `main/main/activate.py`

### Other components

- **User**
- **ROS 2**
- **Ollama / Llama 3**

## Connections

- User → Wake word: speaks to
- Wake word → Speech capture: activates
- Speech capture → ROS 2: publishes transcription
- ROS 2 → LLM processor: delivers transcription
- LLM processor → Ollama / Llama 3: requests response
- LLM processor → ROS 2: publishes response
- ROS 2 → Speech output: delivers response
- Speech output → User: speaks response
- ROS 2 → Conversation history: exchanges dialogue data
- ROS 2 → Bridge node: exchanges messages
- ROS 2 → Emotion handling: exchanges emotion data
- ROS 2 → Dashboard: exchanges status
- ROS 2 → Activation: exchanges activation state
