From 25b595e125019d9b57682b983c4eeb7c48a65daa Mon Sep 17 00:00:00 2001 From: Fabrice Lamant Date: Fri, 29 Aug 2025 14:51:20 +0200 Subject: [PATCH] add suggestions --- src/pipecat/services/gladia/config.py | 3 +-- src/pipecat/services/gladia/stt.py | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pipecat/services/gladia/config.py b/src/pipecat/services/gladia/config.py index 9c23f43a6..2816ebd71 100644 --- a/src/pipecat/services/gladia/config.py +++ b/src/pipecat/services/gladia/config.py @@ -34,7 +34,7 @@ class PreProcessingConfig(BaseModel): """ audio_enhancer: Optional[bool] = None - speech_threshold: Optional[float] = 0.7 + speech_threshold: Optional[float] = None class CustomVocabularyItem(BaseModel): @@ -155,7 +155,6 @@ class GladiaInputParams(BaseModel): Parameters: encoding: Audio encoding format bit_depth: Audio bit depth - sample_rate: Audio sample rate channels: Number of audio channels custom_metadata: Additional metadata to include with requests endpointing: Silence duration in seconds to mark end of speech diff --git a/src/pipecat/services/gladia/stt.py b/src/pipecat/services/gladia/stt.py index 05bc324ef..991c24bcc 100644 --- a/src/pipecat/services/gladia/stt.py +++ b/src/pipecat/services/gladia/stt.py @@ -304,10 +304,7 @@ class GladiaSTTService(STTService): } # Add custom_metadata if provided - if self._params.custom_metadata: - settings["custom_metadata"] = self._params.custom_metadata - else: - settings["custom_metadata"] = {} + settings["custom_metadata"] = dict(self._params.custom_metadata or {}) settings["custom_metadata"]["pipecat"] = pipecat_version # Add endpointing parameters if provided