# itsmetoso/voicestudio architecture

> Architecture diagram of the GitHub repository itsmetoso/voicestudio, 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/itsmetoso/voicestudio
- Repository: https://github.com/itsmetoso/voicestudio

## Overview

VoiceStudio is a local-first speech creation application: users work in the desktop UI, which calls a local backend API to synthesize, transcribe, dub, and manage projects. Its documented workflows include voice cloning/design, dubbing, dictation, stories and audiobooks, and batch jobs; model management and optional remote workers extend the core. The graph reflects README-described capabilities and the supplied source excerpts; wiring for unsampled routes and services is shown only where the product workflow is documented.

Main entry points: [`frontend/src/api/client.ts`](https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/api/client.ts) (API client), [`backend/services/dub_pipeline.py`](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/dub_pipeline.py) (Dub pipeline), [`backend/services/tts_backend.py`](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/tts_backend.py) (TTS backend), [`backend/api/routers/generation.py`](https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/generation.py) (Generation routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Desktop experience"]
  node_ui["Studio UI<br/>[App.jsx]"]
  node_dub_ui["Dubbing workflow"]
  node_engine_ui["Engine controls"]
  node_api_client["API client<br/>[client.ts]"]
end

subgraph group_api["Local API"]
  node_generation_api["Generation routes<br/>[generation.py]"]
  node_dub_api["Dubbing routes<br/>[dub_core.py]"]
  node_dictation_api["Dictation routes<br/>[dictation.py]"]
  node_audiobook_api["Audiobook routes<br/>[audiobook.py]"]
  node_batch_api["Batch routes<br/>[batch.py]"]
  node_diagnostics["Diagnostics<br/>[diagnose.py]"]
end

subgraph group_speech["Speech and media"]
  node_dub_pipeline["Dub pipeline<br/>[dub_pipeline.py]"]
  node_tts["TTS backend<br/>[tts_backend.py]"]
  node_asr["ASR backend<br/>[asr_backend.py]"]
  node_translation["Translation<br/>[translator.py]"]
  node_audiobook["Audiobook service<br/>[audiobook.py]"]
  node_watermark["Audio watermark<br/>[watermark.py]"]
end

subgraph group_runtime["Models and compute"]
  node_engine_routing["Engine routing<br/>[engine_routing.py]"]
  node_engine_adapters["Speech engines<br/>[__init__.py]"]
  node_model_manager["Model management<br/>[model_manager.py]"]
  node_worker["Remote workers<br/>[service.py]"]
  node_local_state[("Local app data<br/>[db.py]")]
end

subgraph group_extensions["Integrations"]
  node_mcp["MCP server<br/>[mcp_server.py]"]
end

node_user(("Studio user"))
node_external_models(("Model providers"))

node_user -->|"uses"| node_ui
node_ui -->|"calls API"| node_api_client
node_dub_ui -->|"calls API"| node_api_client
node_engine_ui -->|"selects engines"| node_api_client
node_api_client -->|"HTTP requests"| node_generation_api
node_api_client -->|"HTTP requests"| node_dub_api
node_api_client -->|"HTTP requests"| node_dictation_api
node_api_client -->|"HTTP requests"| node_audiobook_api
node_api_client -->|"HTTP requests"| node_batch_api
node_generation_api -->|"synthesizes"| node_tts
node_dub_api -->|"runs pipeline"| node_dub_pipeline
node_dub_pipeline -->|"transcribes"| node_asr
node_dub_pipeline -->|"translates"| node_translation
node_dub_pipeline -->|"generates audio"| node_tts
node_dictation_api -->|"transcribes"| node_asr
node_audiobook_api -->|"renders books"| node_audiobook
node_audiobook -->|"synthesizes chapters"| node_tts
node_batch_api -->|"runs jobs"| node_tts
node_tts -->|"selects compute"| node_engine_routing
node_asr -->|"selects compute"| node_engine_routing
node_engine_routing -->|"dispatches"| node_engine_adapters
node_engine_ui -->|"manages models"| node_model_manager
node_model_manager -.->|"downloads models"| node_external_models
node_worker -.->|"executes remotely"| node_engine_routing
node_dub_api -.->|"watermarks audio"| node_watermark
node_mcp -->|"exposes tools"| node_generation_api
node_mcp -->|"exposes tools"| node_dictation_api
node_api_client -->|"requests checks"| node_diagnostics
node_generation_api -->|"persists output"| node_local_state
node_dub_pipeline -->|"persists jobs"| node_local_state
node_audiobook -->|"stores projects"| node_local_state

click node_ui "https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/App.jsx"
click node_dub_ui "https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/components/dub/DubPipelineStepper.jsx"
click node_engine_ui "https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/components/EngineQuickSwitch.jsx"
click node_api_client "https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/api/client.ts"
click node_generation_api "https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/generation.py"
click node_dub_api "https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/dub_core.py"
click node_dub_pipeline "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/dub_pipeline.py"
click node_dictation_api "https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/dictation.py"
click node_audiobook_api "https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/audiobook.py"
click node_batch_api "https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/batch.py"
click node_tts "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/tts_backend.py"
click node_asr "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/asr_backend.py"
click node_translation "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/translator.py"
click node_audiobook "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/audiobook.py"
click node_engine_routing "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/engine_routing.py"
click node_engine_adapters "https://github.com/itsmetoso/voicestudio/blob/main/backend/engines/__init__.py"
click node_model_manager "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/model_manager.py"
click node_worker "https://github.com/itsmetoso/voicestudio/blob/main/backend/worker/service.py"
click node_watermark "https://github.com/itsmetoso/voicestudio/blob/main/backend/services/watermark.py"
click node_mcp "https://github.com/itsmetoso/voicestudio/blob/main/backend/mcp_server.py"
click node_diagnostics "https://github.com/itsmetoso/voicestudio/blob/main/backend/core/diagnose.py"
click node_local_state "https://github.com/itsmetoso/voicestudio/blob/main/backend/core/db.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_ui,node_dub_ui,node_engine_ui,node_api_client,node_user toneBlue
class node_generation_api,node_dub_api,node_dictation_api,node_audiobook_api,node_batch_api,node_diagnostics toneAmber
class node_dub_pipeline,node_tts,node_asr,node_translation,node_audiobook,node_watermark toneMint
class node_engine_routing,node_engine_adapters,node_model_manager,node_worker,node_local_state toneRose
class node_mcp,node_external_models toneIndigo
```

## Components

### Desktop experience

- [Studio UI](https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Dubbing workflow](https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/components/dub/DubPipelineStepper.jsx): `frontend/src/components/dub/DubPipelineStepper.jsx`
- [Engine controls](https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/components/EngineQuickSwitch.jsx): `frontend/src/components/EngineQuickSwitch.jsx`
- [API client](https://github.com/itsmetoso/voicestudio/blob/main/frontend/src/api/client.ts): `frontend/src/api/client.ts`

### Local API

- [Generation routes](https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/generation.py): `backend/api/routers/generation.py`
- [Dubbing routes](https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/dub_core.py): `backend/api/routers/dub_core.py`
- [Dictation routes](https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/dictation.py): `backend/api/routers/dictation.py`
- [Audiobook routes](https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/audiobook.py): `backend/api/routers/audiobook.py`
- [Batch routes](https://github.com/itsmetoso/voicestudio/blob/main/backend/api/routers/batch.py): `backend/api/routers/batch.py`
- [Diagnostics](https://github.com/itsmetoso/voicestudio/blob/main/backend/core/diagnose.py): `backend/core/diagnose.py`

### Speech and media

- [Dub pipeline](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/dub_pipeline.py): `backend/services/dub_pipeline.py`
- [TTS backend](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/tts_backend.py): `backend/services/tts_backend.py`
- [ASR backend](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/asr_backend.py): `backend/services/asr_backend.py`
- [Translation](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/translator.py): `backend/services/translator.py`
- [Audiobook service](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/audiobook.py): `backend/services/audiobook.py`
- [Audio watermark](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/watermark.py): `backend/services/watermark.py`

### Models and compute

- [Engine routing](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/engine_routing.py): `backend/services/engine_routing.py`
- [Speech engines](https://github.com/itsmetoso/voicestudio/blob/main/backend/engines/__init__.py): `backend/engines/__init__.py`
- [Model management](https://github.com/itsmetoso/voicestudio/blob/main/backend/services/model_manager.py): `backend/services/model_manager.py`
- [Remote workers](https://github.com/itsmetoso/voicestudio/blob/main/backend/worker/service.py): `backend/worker/service.py`
- [Local app data](https://github.com/itsmetoso/voicestudio/blob/main/backend/core/db.py): `backend/core/db.py`

### Integrations

- [MCP server](https://github.com/itsmetoso/voicestudio/blob/main/backend/mcp_server.py): `backend/mcp_server.py`

### Other components

- **Studio user**
- **Model providers**

## Connections

- Studio user → Studio UI: uses
- Studio UI → API client: calls API
- Dubbing workflow → API client: calls API
- Engine controls → API client: selects engines
- API client → Generation routes: HTTP requests
- API client → Dubbing routes: HTTP requests
- API client → Dictation routes: HTTP requests
- API client → Audiobook routes: HTTP requests
- API client → Batch routes: HTTP requests
- Generation routes → TTS backend: synthesizes
- Dubbing routes → Dub pipeline: runs pipeline
- Dub pipeline → ASR backend: transcribes
- Dub pipeline → Translation: translates
- Dub pipeline → TTS backend: generates audio
- Dictation routes → ASR backend: transcribes
- Audiobook routes → Audiobook service: renders books
- Audiobook service → TTS backend: synthesizes chapters
- Batch routes → TTS backend: runs jobs
- TTS backend → Engine routing: selects compute
- ASR backend → Engine routing: selects compute
- Engine routing → Speech engines: dispatches
- Engine controls → Model management: manages models
- Model management → Model providers: downloads models
- Remote workers → Engine routing: executes remotely
- Dubbing routes → Audio watermark: watermarks audio
- MCP server → Generation routes: exposes tools
- MCP server → Dictation routes: exposes tools
- API client → Diagnostics: requests checks
- Generation routes → Local app data: persists output
- Dub pipeline → Local app data: persists jobs
- Audiobook service → Local app data: stores projects
