The RLAC (Real-time Live Audio Chronicle) system from GroovyMorning relies on a distributed architecture where two environments collaborate: a Java (Gradle) backend for recording and a Python (FastAPI) server for artificial intelligence. Maintaining perfect synchronization to the second on a stream running 24/7 is the primary challenge.
The heart of the recording system (located in 1.RLAC-AudioRecorder) is based on a master stream approach:
continuousStartTime). Each segment N is thus virtually timestamped: T = StartTime + N.When a chronicle capture task listens to the stream, it receives start and end notifications from the AI (the Python server). However, several seconds can elapse between the actual start of the chronicle and its confirmation by the AI (transcription latency, LLM analysis, etc.).
To resolve this offset, a retroactive correction strategy is employed:
realDuration, the actual end time is recalculated by the Java server. Excess segments, linked by mistake due to latency, are then instantly deleted.
This recalibration mechanism is the key element that transforms sometimes imprecise or late AI detection into a perfectly segmented audio file for the end user.