Skip to content
Merged
Changes from all 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
7 changes: 5 additions & 2 deletions joinly/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from joinly.container import SessionContainer
from joinly.session import MeetingSession
from joinly.types import Transcript
from joinly.types import SpeechInterruptedError, Transcript

if TYPE_CHECKING:
from mcp import ServerSession
Expand Down Expand Up @@ -64,7 +64,7 @@
rem()

# ensure proper cleanup
from anyio import CancelScope

Check failure on line 67 in joinly/server.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (PLC0415)

joinly/server.py:67:9: PLC0415 `import` should be at the top-level of a file

with CancelScope(shield=True):
await session_container.__aexit__()
Expand Down Expand Up @@ -139,7 +139,10 @@
) -> str:
"""Speak the given text in the meeting using TTS."""
ms: MeetingSession = ctx.request_context.lifespan_context.meeting_session
await ms.speak_text(text)
try:
await ms.speak_text(text)
except SpeechInterruptedError as e:
return str(e)
return "Finished speaking."


Expand Down
Loading