diff --git a/sdk/rt/speechmatics/rt/_models.py b/sdk/rt/speechmatics/rt/_models.py index cf2540e..c035834 100644 --- a/sdk/rt/speechmatics/rt/_models.py +++ b/sdk/rt/speechmatics/rt/_models.py @@ -41,6 +41,7 @@ class OperatingPoint(str, Enum): ENHANCED = "enhanced" STANDARD = "standard" MELIA_1 = "melia-1" + OAK_1 = "oak-1" class Model(str, Enum): @@ -49,6 +50,7 @@ class Model(str, Enum): ENHANCED = "enhanced" STANDARD = "standard" MELIA_1 = "melia-1" + OAK_1 = "oak-1" @dataclass @@ -399,7 +401,7 @@ class TranscriptionConfig: Recognition is restricted to these languages, which improves accuracy on multilingual audio. Typically used with ``language="multi"``. Hints take precedence over ``language``, so the transcript may not contain the language named there. - Applicable only for the next-gen models (e.g. melia-1). + Applicable only for the next-gen models (e.g. melia-1, oak-1). Defaults to None. language_hints_strict: (Optional) Controls how strictly ``language_hints`` is applied, and is only valid alongside it. diff --git a/tests/rt/test_models.py b/tests/rt/test_models.py index e4cd974..69f5a98 100644 --- a/tests/rt/test_models.py +++ b/tests/rt/test_models.py @@ -1,6 +1,15 @@ +from speechmatics.rt._models import Model from speechmatics.rt._models import TranscriptionConfig +class TestModelToDict: + def test_oak_model_gets_serialized(self): + config = TranscriptionConfig(model=Model.OAK_1) + result = config.to_dict() + assert result["model"] == Model.OAK_1 + assert "operating_point" not in result + + class TestLanguageHintsToDict: def test_language_hints_serializes_correctly(self): config = TranscriptionConfig(language_hints=["en", "fr"])