Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/agents/voice/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class StreamedAudioInput:
def __init__(self):
self.queue: asyncio.Queue[npt.NDArray[np.int16 | np.float32]] = asyncio.Queue()

async def add_audio(self, audio: npt.NDArray[np.int16 | np.float32]):
async def add_audio(self, audio: npt.NDArray[np.int16 | np.float32] | None):
"""Adds more audio data to the stream.

Args:
audio: The audio data to add. Must be a numpy array of int16 or float32.
audio: The audio data to add. Must be a numpy array of int16 or float32 or None. If None passed, it indicates the end of the stream.
"""
await self.queue.put(audio)
Loading