feat: add chunked meeting transcription and logging

This commit is contained in:
2026-06-08 12:11:00 +00:00
parent eca1a386d0
commit d101c34156
4 changed files with 439 additions and 74 deletions
+6
View File
@@ -1,10 +1,13 @@
from __future__ import annotations
import logging
from pathlib import Path
from typing import Callable
from discord.ext import voice_recv
logger = logging.getLogger(__name__)
class MeetingRecorder:
"""Wrapper around discord-ext-voice-recv's listen/stop_listening API."""
@@ -23,11 +26,14 @@ class MeetingRecorder:
self.sink = voice_recv.WaveSink(self.output_path)
self.vc.listen(self.sink, after=after_callback)
self.recording = True
logger.info("Voice receive started: output_path=%s", self.output_path)
async def stop(self) -> None:
if not self.recording:
logger.info("Stop requested, but recorder was already inactive: output_path=%s", self.output_path)
return
if self.vc.is_listening():
self.vc.stop_listening()
logger.info("Voice receive stop requested: output_path=%s", self.output_path)
self.recording = False