Skip to content

Commit

Permalink
allow iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-purplefish committed Oct 14, 2024
1 parent 7481469 commit de372e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion livekit-agents/livekit/agents/pipeline/agent_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ async def _synthesize_task(self, handle: SynthesisHandle) -> None:
if isinstance(transcript_source, Awaitable):
transcript_source = await transcript_source
if not self._tts.capabilities.streaming:
logger.debug("forcing tts source to be a string since TTS is not streaming")
logger.debug(
"forcing tts source to be a string since TTS does not streaming"
)
if isinstance(tts_source, AsyncIterable):
# force the tts source to be a string
tts_source = await asyncio.to_thread("".join, tts_source)
Expand Down

0 comments on commit de372e0

Please sign in to comment.