Remove deprecated InputParams alias from GladiaSTTService

This commit is contained in:
Mark Backman
2026-03-31 23:11:00 -04:00
parent a2a42b8703
commit f83d062df9

View File

@@ -13,7 +13,6 @@ supporting multiple languages, custom vocabulary, and various audio processing o
import asyncio import asyncio
import base64 import base64
import json import json
import warnings
from dataclasses import dataclass, field from dataclasses import dataclass, field
from typing import Any, AsyncGenerator, Literal, Optional from typing import Any, AsyncGenerator, Literal, Optional
@@ -171,21 +170,6 @@ def language_to_gladia_language(language: Language) -> Optional[str]:
# Deprecation warning for nested InputParams # Deprecation warning for nested InputParams
class _InputParamsDescriptor:
"""Descriptor for backward compatibility with deprecation warning."""
def __get__(self, obj, objtype=None):
with warnings.catch_warnings():
warnings.simplefilter("always")
warnings.warn(
"GladiaSTTService.InputParams is deprecated and will be removed in a future version. "
"Import and use GladiaInputParams directly instead.",
DeprecationWarning,
stacklevel=2,
)
return GladiaInputParams
@dataclass @dataclass
class GladiaSTTSettings(STTSettings): class GladiaSTTSettings(STTSettings):
"""Settings for GladiaSTTService. """Settings for GladiaSTTService.
@@ -225,17 +209,11 @@ class GladiaSTTService(WebsocketSTTService):
Provides automatic reconnection, audio buffering, and comprehensive error handling. Provides automatic reconnection, audio buffering, and comprehensive error handling.
For complete API documentation, see: https://docs.gladia.io/api-reference/v2/live/init For complete API documentation, see: https://docs.gladia.io/api-reference/v2/live/init
.. deprecated:: 0.0.62
Use :class:`~pipecat.services.gladia.config.GladiaInputParams` directly instead.
""" """
Settings = GladiaSTTSettings Settings = GladiaSTTSettings
_settings: Settings _settings: Settings
# Maintain backward compatibility
InputParams = _InputParamsDescriptor()
def __init__( def __init__(
self, self,
*, *,