From 09f171b69de9e6b99b8d3f67d2113b2af3da05b3 Mon Sep 17 00:00:00 2001 From: Fabrice Lamant Date: Tue, 12 Aug 2025 12:05:38 +0200 Subject: [PATCH] fix: only pass region if set --- src/pipecat/services/gladia/stt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pipecat/services/gladia/stt.py b/src/pipecat/services/gladia/stt.py index 81cbcf3a9..fed9d1a4c 100644 --- a/src/pipecat/services/gladia/stt.py +++ b/src/pipecat/services/gladia/stt.py @@ -488,11 +488,14 @@ class GladiaSTTService(STTService): async def _setup_gladia(self, settings: Dict[str, Any]): async with aiohttp.ClientSession() as session: + params = {} + if self._region: + params["region"] = self._region async with session.post( self._url, headers={"X-Gladia-Key": self._api_key}, json=settings, - params={"region": self._region or "eu-west"}, + params=params, ) as response: if response.ok: return await response.json()