Cuemark EVI - Architecture Diagrams

CLM (Custom Language Model) Architecture - April 2026

1. Architecture Overview

graph TB subgraph Browser APP[Cuemark EVI App] MIC[Microphone] SPK[Speaker] end subgraph DevVPS WEB[cuemark-evi-web :8081] CLM[cuemark-clm :8082] end subgraph Hume_Cloud STT[Speech-to-Text] EVI[EVI Pipeline] TTS[Text-to-Speech] end APP --> WEB APP -->|1 POST /init-session| CLM APP <-->|2 WebSocket| EVI MIC -->|3 Audio| STT STT -->|4 Transcript| EVI EVI -->|5 POST /chat/completions| CLM CLM -->|6 SSE next line| EVI EVI -->|7 Generate speech| TTS TTS -->|8 Audio chunks| SPK

2. Detailed Sequence - One Rehearsal Turn

sequenceDiagram participant A as Actor participant B as Browser App participant C as CLM Server participant H as Hume EVI Note over B,C: SESSION SETUP A->>B: Pick script and characters B->>C: POST /init-session with script text C-->>B: OK - 12 lines total, 6 agent lines B->>H: WebSocket connect with CLM config B->>H: sendSessionSettings with auth key A->>B: Tap Start, grant mic Note over A,H: TURN 1 A->>H: Speaks line into mic H->>H: Transcribes speech to text H->>B: user_message event H->>C: POST /chat/completions?custom_session_id=xxx C->>C: Look up session, get next agent line C-->>H: SSE stream with exact scripted line H->>H: Convert text to speech H->>B: assistant_message event H->>B: audio_output chunks B->>A: Plays agent line through speaker Note over A,H: TURN 2 - same flow repeats A->>H: Speaks next line H->>C: POST /chat/completions C-->>H: Next agent line H->>B: Audio of that line Note over C: When no lines left C-->>H: Scene complete

3. Infrastructure - What Lives Where

graph LR subgraph DevVPS_192.168.1.47 direction TB W[cuemark-evi-web\nPort 8081\nStatic React app] CL[cuemark-clm\nPort 8082\nHolds script in memory\nReturns exact lines] end subgraph Hume_AI_Cloud direction TB P[EVI Pipeline\nSTT then CLM then TTS\nOnly sees one line at a time] end subgraph Pangolin_Proxy direction TB R1[cuemark-evi.logicmesh.dev] R2[clm.cuemark-evi.logicmesh.dev] end R1 --> W R2 --> CL P -->|Calls your CLM| CL