Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jayeshp19 committed Jan 2, 2025
1 parent 06d60ba commit 4800261
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions livekit-agents/livekit/agents/multimodal/agent_playout.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def __init__(
self,
*,
audio_source: rtc.AudioSource,
stt: stt.STT,
stt_forwarder: stt.STTForwarder,
stt: stt.STT | None,
stt_forwarder: transcription.STTSegmentsForwarder | None,
) -> None:
super().__init__()
self._source = audio_source
Expand Down Expand Up @@ -180,7 +180,7 @@ async def _stt_stream_co() -> None:
done, _ = await asyncio.wait(
[asyncio.gather(*tasks), handle._int_fut],
return_when=asyncio.FIRST_COMPLETED,
)
) # type: ignore

handle._total_played_time = (
handle._pushed_duration - self._source.queued_duration
Expand Down
4 changes: 2 additions & 2 deletions livekit-agents/livekit/agents/multimodal/multimodal_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __init__(
transcription=transcription,
)

if stt is not None and not stt.capabilities.streaming:
if stt and vad and not stt.capabilities.streaming:
from .. import stt as speech_to_text

stt = speech_to_text.StreamAdapter(
Expand Down Expand Up @@ -488,7 +488,7 @@ def _subscribe_to_microphone(self, *args, **kwargs) -> None:
self._subscribed_track = publication.track # type: ignore
stream_24khz = rtc.AudioStream(
self._subscribed_track, sample_rate=24000, num_channels=1
)
) # type: ignore
self._stt_forwarder = STTSegmentsForwarder(
room=self._room,
participant=self._linked_participant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
utils,
)

from google import genai
from google.genai import types
from google import genai # type: ignore
from google.genai import types # type: ignore

from .api_proto import LiveAPIModels

Expand Down

0 comments on commit 4800261

Please sign in to comment.