# gncyyldz/smartmodelrouting architecture

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

- Interactive diagram: https://gitdiagram.com/gncyyldz/smartmodelrouting
- Repository: https://github.com/gncyyldz/smartmodelrouting

## Overview

SmartModelRouting exposes a text-to-speech tool: a caller supplies text, the tool requests Turkish audio from a local Piper service, writes the returned bytes to a temporary WAV file, and returns its path. The sampled source supports this flow; Program.cs and the skill documents are present in the tree but were not inspected, so their wiring and additional capabilities are not inferred.

Main entry points: [`SmartModelRouting/Tools/TTSTools.cs`](https://github.com/gncyyldz/smartmodelrouting/blob/master/SmartModelRouting/Tools/TTSTools.cs) (TTS Tool)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Tool Caller"))
node_tts_tool["TTS Tool<br/>[TTSTools.cs]"]
node_piper["Local Piper API"]
node_temp_wav["Temporary WAV"]

node_caller -->|"invokes"| node_tts_tool
node_tts_tool -->|"requests audio"| node_piper
node_tts_tool -->|"writes bytes"| node_temp_wav
node_tts_tool -->|"returns path"| node_caller

click node_tts_tool "https://github.com/gncyyldz/smartmodelrouting/blob/master/SmartModelRouting/Tools/TTSTools.cs"

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_caller,node_temp_wav toneIndigo
class node_tts_tool toneTeal
class node_piper toneMint
```

## Components

### Other components

- **Tool Caller**
- [TTS Tool](https://github.com/gncyyldz/smartmodelrouting/blob/master/SmartModelRouting/Tools/TTSTools.cs): `SmartModelRouting/Tools/TTSTools.cs`
- **Local Piper API**
- **Temporary WAV**

## Connections

- Tool Caller → TTS Tool: invokes
- TTS Tool → Local Piper API: requests audio
- TTS Tool → Temporary WAV: writes bytes
- TTS Tool → Tool Caller: returns path
