Improve SessionProperties initialization: remove voice from args, set default for TurnDetection

This commit is contained in:
Mark Backman
2025-12-20 08:02:48 -05:00
parent 0576783c5e
commit 348fa5a719
3 changed files with 16 additions and 23 deletions

View File

@@ -52,7 +52,6 @@ from pipecat.runner.types import RunnerArguments
from pipecat.runner.utils import create_transport
from pipecat.services.grok.realtime.events import (
SessionProperties,
TurnDetection,
WebSearchTool,
XSearchTool,
)
@@ -172,11 +171,8 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
# Configure Grok session properties
session_properties = SessionProperties(
# Voice options: Ara (warm, friendly), Rex (confident), Sal (smooth),
# Eve (energetic), Leo (authoritative)
# Voice options: Ara, Rex, Sal, Eve, Leo
voice="Ara",
# Enable server-side VAD for automatic turn detection
turn_detection=TurnDetection(type="server_vad"),
# System instructions
instructions="""You are a helpful and friendly AI assistant powered by Grok.