Skip to content

Commit 939b976

Browse files
committed
fix type issues
1 parent d2a97ee commit 939b976

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

livekit-agents/livekit/agents/voice/recorder_io/recorder_io.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ def recording_started_at(self) -> float | None:
116116
def _write_cb(self, buf: list[rtc.AudioFrame]) -> None:
117117
assert self._in_record is not None
118118

119-
input_buf = self._in_record.take_buf(pad_since=self._out_record._last_speech_end_time)
119+
input_buf = self._in_record.take_buf(
120+
pad_since=self._out_record._last_speech_end_time if self._out_record else None
121+
)
120122
self._in_q.put_nowait(input_buf)
121123
self._out_q.put_nowait(buf)
122124

0 commit comments

Comments
 (0)