How arkonballoon/voicetodocweb works
• Frontend:
• Vue.js Application: Represent the user interface components responsible for transcription views, template management, configuration, and rich-text editing.
• Client-side Routing and State Management: Using Vue Router and Pinia.
• Backend:
• FastAPI Server: Acts as the core API endpoint provider for RESTful operations and WebSocket-based live audio streaming.
• Audio Processing Modules: Such as the audio_processor.py and transcriber.py, which wrap the Whisper model for transcription.
• Template and Data Handling:
▪ Template Processor and Service: Handle template-based text processing using GPT-4.
▪ Database and Storage Adapters: Modules in the “database” and “storage” directories that manage persistence (SQL adapter, filesystem adapter) and connection management.
• Queue Manager: Possibly managing asynchronous processing tasks.
• External Services and Infrastructure:
• OpenAI API: For processing templates with GPT-4.
• Docker & Docker Compose: Representing the containerized deployment of both frontend and backend.
• (Optional) WebRTC: For live audio streaming.
• NVIDIA GPU/CPU Selection: As a decision point for accelerated transcription (managed via config parameters).
Relationships and Data Flow
• Frontend-to-Backend Communication:
• REST API calls: For transcription requests, template saving, and configuration updates.
• WebSocket connections: For live audio streaming and real-time transcription feeds.
• Backend Internal Interactions:
• The API layer routes requests to the appropriate service modules (audio processing, template processing).
• Storage Layer: Interacts with both file-based storage and database modules; these modules handle data persistence, configuration management (using config files and JSON files in the data directory).
• Queue Manager: Oversees task scheduling between incoming transcription jobs and template processing tasks.
• External API Integration:
• When processing templates via GPT-4 through OpenAI’s API, data flows from the backend service to the external service and back.
Architectural Patterns/Design Principles
• Separation of Concerns:
• Frontend and backend responsibilities are clearly separated into distinct Docker containers.
• Modular Design:
• The backend code is organized into dedicated modules for modeling, database connectivity, data processing, storage management, and services—indicative of a layered architecture.
• Containerization:
• The use of Docker and Docker Compose promotes portability and consistent deployment environments.
• Real-Time Data Handling:
• Use of WebSocket indicates support for live, streaming data interactions in addition to standard RESTful interactions.
Technologies and Frameworks
• Frontend Technologies:
• Vue.js 3, Vue Router, Vue Quill, Pinia.
• Backend Technologies:
• FastAPI, Whisper, OpenAI’s GPT-4.
• Containerization and Deployment:
• Docker, Docker Compose.
• Additional Tools:
• ESLint, Prettier, and development utilities (e.g., install_pytorch.sh for PyTorch setup).