Merge pull request #3720 from pipecat-ai/mb/fix-grok-realtime
Fix Grok Realtime voice type validation for server responses
This commit is contained in:
1
changelog/3720.fixed.md
Normal file
1
changelog/3720.fixed.md
Normal file
@@ -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"`).
|
||||||
@@ -216,7 +216,7 @@ class SessionProperties(BaseModel):
|
|||||||
model_config = ConfigDict(arbitrary_types_allowed=True)
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
||||||
|
|
||||||
instructions: Optional[str] = None
|
instructions: Optional[str] = None
|
||||||
voice: Optional[GrokVoice] = "Ara"
|
voice: Optional[GrokVoice | str] = "Ara"
|
||||||
turn_detection: Optional[TurnDetection] = Field(
|
turn_detection: Optional[TurnDetection] = Field(
|
||||||
default_factory=lambda: TurnDetection(type="server_vad")
|
default_factory=lambda: TurnDetection(type="server_vad")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user