diff --git a/changelog/3720.fixed.md b/changelog/3720.fixed.md new file mode 100644 index 000000000..c3cb69d34 --- /dev/null +++ b/changelog/3720.fixed.md @@ -0,0 +1 @@ +- Fixed Grok Realtime `session.updated` event parsing failure caused by the API returning prefixed voice names (e.g. `"human_Ara"` instead of `"Ara"`). diff --git a/src/pipecat/services/grok/realtime/events.py b/src/pipecat/services/grok/realtime/events.py index 4069ff927..1f89a92f7 100644 --- a/src/pipecat/services/grok/realtime/events.py +++ b/src/pipecat/services/grok/realtime/events.py @@ -216,7 +216,7 @@ class SessionProperties(BaseModel): model_config = ConfigDict(arbitrary_types_allowed=True) instructions: Optional[str] = None - voice: Optional[GrokVoice] = "Ara" + voice: Optional[GrokVoice | str] = "Ara" turn_detection: Optional[TurnDetection] = Field( default_factory=lambda: TurnDetection(type="server_vad") )