Refactor LLM processor and improve async handling

Move contextual information handling from noise filtering to extraction
and centralize LLM call logic. Wrap blocking transcription and state
update calls in asyncio.to_thread to prevent event loop blocking.
Update transcriber model size to base.
This commit is contained in:
2026-05-28 18:54:09 -07:00
parent afa8d17f10
commit 2363cde160
5 changed files with 26 additions and 42 deletions
+4 -2
View File
@@ -44,7 +44,7 @@ class PipelineOrchestrator:
# Modules
self.listener = AudioListener(loop=self.loop)
self.transcriber = Transcriber(model_size="small")
self.transcriber = Transcriber(model_size="base")
self.processor = LLMProcessor()
self.rag_manager = RAGManager()
@@ -107,7 +107,9 @@ class PipelineOrchestrator:
full_audio = np.concatenate(self.audio_buffer)
# Transcribe (WhisperX now returns a list of (speaker, text, start, end))
results = self.transcriber.transcribe(full_audio)
results = await asyncio.to_thread(
self.transcriber.transcribe, full_audio
)
# Filter for only new segments that start after the last processed segment
new_segments = [