# abus-aikorea/voice-pro architecture

> Architecture diagram of the GitHub repository abus-aikorea/voice-pro, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abus-aikorea/voice-pro
- Repository: https://github.com/abus-aikorea/voice-pro

## Overview

##### Main System Components

a) Frontend Layer:
- Web UI (Gradio-based interface)
- Multiple functional tabs (Studio, TTS, Live Translation, Batch)
- Static assets (CSS/JS files in src/css and src/js)

b) Core Processing Layer:
- Media Processing Pipeline
- YouTube Download Module
- Audio Processing Module (Demucs/MDX-Net)
- Speech Recognition Module (Whisper variants)
- Translation Engine
- Text-to-Speech Systems (Edge-TTS, F5-TTS)

c) Model Layer:
- AI Models Repository
- Demucs models
- F5-TTS models
- MDXNet models
- VAD models

d) Infrastructure Layer:
- File System Storage
- CUDA/GPU Processing
- Configuration Management

##### Component Relationships

**[Web UI Layer]**
- ↕
**[Core Processing Layer]**
- ↕
**[Model Layer]**
- ↕
**[Infrastructure Layer]**

##### Detailed Component Breakdown

- Rectangles: Main components
- Rounded rectangles: Services
- Hexagons: Processing units

- Blue: UI components
- Green: Processing modules
- Yellow: AI models
- Gray: Infrastructure
- Red: Critical paths

##### Key Workflows to Highlight

a) Media Processing Pipeline:
**YouTube Input → Download → Audio Separation → Speech Recognition → Translation → TTS → Output**

b) Live Translation Flow:
**Audio Input → Real-time Recognition → Translation → Display/TTS**

c) Model Integration:
**Request → Model Selection → Processing → Result Generation**

##### Technical Details

- Supported file formats
- Model variants (Whisper, Faster-Whisper, etc.)
- Language support (100+ languages)
- Processing options (denoise levels, compute types)
- Resource requirements (VRAM, RAM)

##### Implementation Notes

- Maintain a clear hierarchy of components
- Version information
- Document system requirements

This architecture should be represented as a scalable system that can handle both batch processing and real-time operations, with clear separation of concerns between different functional modules.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef processing fill:#2ecc71,stroke:#27ae60,color:white
    classDef model fill:#f1c40f,stroke:#f39c12,color:black
    classDef infrastructure fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef storage fill:#e74c3c,stroke:#c0392b,color:white

    %% Frontend Layer
    subgraph Frontend
        UI[Web UI Interface]:::frontend
        StaticAssets[Static Assets]:::frontend
        TabManager[Tab Management]:::frontend
    end

    %% Core Processing Layer
    subgraph Processing
        AudioProc[Audio Processing]:::processing
        VoiceProc[Voice Processing]:::processing
        VAD[Voice Activity Detection]:::processing
        Progress[Progress Tracking]:::processing
    end

    %% Model Layer
    subgraph Models
        DemucsM[Demucs Models]:::model
        F5TTSM[F5-TTS Models]:::model
        MDXNetM[MDXNet Models]:::model
        VADM[VAD Models]:::model
    end

    %% Infrastructure Layer
    subgraph Infrastructure
        I18N[Internationalization]:::infrastructure
        Config[Configuration]:::infrastructure
        Utils[Shared Utilities]:::infrastructure
        Entry[Application Entry Points]:::infrastructure
    end

    %% Voice Conversion System
    subgraph VoiceConversion
        RVCCore[RVC Core]:::processing
        RVCConfig[RVC Configs]:::infrastructure
    end

    %% Relationships
    Frontend --> Processing
    Processing --> Models
    Processing --> Infrastructure
    VoiceConversion --> Models
    VoiceConversion --> Infrastructure

    %% Click events for component mapping
    click UI "https://github.com/abus-aikorea/voice-pro/blob/main/src/ui.py"
    click StaticAssets "https://github.com/abus-aikorea/voice-pro/tree/main/src/css/"
    click TabManager "https://github.com/abus-aikorea/voice-pro/blob/main/src/js/switch_tabs.js"
    click AudioProc "https://github.com/abus-aikorea/voice-pro/tree/main/src/demucs/"
    click VoiceProc "https://github.com/abus-aikorea/voice-pro/tree/main/src/aicover/"
    click VAD "https://github.com/abus-aikorea/voice-pro/blob/main/src/vad.py"
    click Progress "https://github.com/abus-aikorea/voice-pro/blob/main/src/progressListener.py"
    click DemucsM "https://github.com/abus-aikorea/voice-pro/tree/main/model/demucs/"
    click F5TTSM "https://github.com/abus-aikorea/voice-pro/tree/main/model/f5-tts/"
    click MDXNetM "https://github.com/abus-aikorea/voice-pro/tree/main/model/mdxnet-model/"
    click VADM "https://github.com/abus-aikorea/voice-pro/tree/main/model/vad/"
    click I18N "https://github.com/abus-aikorea/voice-pro/tree/main/src/i18n/"
    click Config "https://github.com/abus-aikorea/voice-pro/blob/main/src/config.py"
    click Utils "https://github.com/abus-aikorea/voice-pro/blob/main/src/shared.py"
    click Entry "https://github.com/abus-aikorea/voice-pro/blob/main/start-voice.py"
    click RVCCore "https://github.com/abus-aikorea/voice-pro/tree/main/rvc/infer/"
    click RVCConfig "https://github.com/abus-aikorea/voice-pro/tree/main/rvc/configs/"
```
