fix: add summary fallback and stabilize recording sink
This commit is contained in:
@@ -16,14 +16,15 @@ class MeetingRecorder:
|
||||
self.vc = voice_client
|
||||
self.output_path = output_path
|
||||
self.recording = False
|
||||
self.sink: voice_recv.WaveSink | None = None
|
||||
self.sink: voice_recv.AudioSink | None = None
|
||||
|
||||
async def start(self, after_callback: Callable[[Exception | None], None]) -> None:
|
||||
if self.vc.is_listening():
|
||||
raise RuntimeError("Voice client is already listening")
|
||||
|
||||
Path(self.output_path).parent.mkdir(parents=True, exist_ok=True)
|
||||
self.sink = voice_recv.WaveSink(self.output_path)
|
||||
wave_sink = voice_recv.WaveSink(self.output_path)
|
||||
self.sink = voice_recv.SilenceGeneratorSink(wave_sink)
|
||||
self.vc.listen(self.sink, after=after_callback)
|
||||
self.recording = True
|
||||
logger.info("Voice receive started: output_path=%s", self.output_path)
|
||||
|
||||
Reference in New Issue
Block a user