From c736a103f54fe5d768f0ee85f3be3a1722da673c Mon Sep 17 00:00:00 2001 From: pylrn Date: Wed, 23 Sep 2026 19:01:04 +0530 Subject: [PATCH 1/2] fix(types): accept multichannel as valid speaker-separation for conversational summary model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SummarizationModel.conversational docstring listed only `speaker_labels` and `dual_channel` as valid speaker-separation requirements, omitting `multichannel` — the recommended and non-deprecated alternative to `dual_channel`. This caused confusion because passing `multichannel=True` alongside `summary_model=SummarizationModel.conversational` is fully supported by the API but was undocumented, leading users to incorrectly assume they had to use the deprecated `dual_channel` flag. Fixes AssemblyAI/assemblyai-node-sdk#71 (same root cause applies to the Python SDK docstring). Changes: - Updated `SummarizationModel.conversational` docstring to list `multichannel` as the recommended speaker-separation option, with `dual_channel` noted as deprecated. - Added parametrized regression test `test_conversational_summary_with_speaker_separation` covering multichannel, speaker_labels, and dual_channel to confirm no client-side error is raised for any of these valid combinations. --- assemblyai/types.py | 3 +- tests/unit/test_summarization.py | 47 ++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/assemblyai/types.py b/assemblyai/types.py index 92377f68..afab9ce3 100644 --- a/assemblyai/types.py +++ b/assemblyai/types.py @@ -575,7 +575,8 @@ class SummarizationModel(str, Enum): Required Parameters: - `punctuate`: `True` - `format_text`: `True` - - `speaker_labels` or `dual_channel` set to `True` + - `speaker_labels`, `multichannel`, or `dual_channel` set to `True` + (`multichannel` is the recommended option; `dual_channel` is deprecated) """ catchy = "catchy" diff --git a/tests/unit/test_summarization.py b/tests/unit/test_summarization.py index 07fad1bb..e46d6611 100644 --- a/tests/unit/test_summarization.py +++ b/tests/unit/test_summarization.py @@ -138,3 +138,50 @@ def test_summarization_params_excluded_when_disabled(httpx_mock: HTTPXMock): # Check that transcript was properly parsed from JSON response assert transcript.error is None assert transcript.summary is None + + +@pytest.mark.parametrize( + "speaker_separation_param", + [ + {"multichannel": True}, + {"speaker_labels": True}, + {"dual_channel": True}, + ], + ids=["multichannel", "speaker_labels", "dual_channel"], +) +def test_conversational_summary_with_speaker_separation( + httpx_mock: HTTPXMock, speaker_separation_param: dict +): + """ + Tests that `summary_model=conversational` is accepted together with any of + the valid speaker-separation flags (`multichannel`, `speaker_labels`, + `dual_channel`) without a client-side error. + + Regression test for https://github.com/AssemblyAI/assemblyai-node-sdk/issues/71 — + `multichannel=True` was previously undocumented as a valid alternative to + `speaker_labels`/`dual_channel` for conversational summaries. + """ + mock_response = factories.generate_dict_factory(SummarizationResponseFactory)() + request_body, transcript = test_utils.submit_mock_transcription_request( + httpx_mock, + mock_response, + aai.TranscriptionConfig( + summarization=True, + summary_model=aai.SummarizationModel.conversational, + summary_type=aai.SummarizationType.bullets, + **speaker_separation_param, # type: ignore[arg-type] + ), + ) + + # The SDK must not raise before submitting + assert request_body.get("summarization") is True + assert request_body.get("summary_model") == aai.SummarizationModel.conversational + assert request_body.get("summary_type") == aai.SummarizationType.bullets + + # The speaker-separation flag must be forwarded to the API + for key, value in speaker_separation_param.items(): + assert request_body.get(key) == value + + # Response must be parsed correctly + assert transcript.error is None + assert transcript.summary == mock_response["summary"] From b6c61831bfd294323cc934838877b73ccf1c3567 Mon Sep 17 00:00:00 2001 From: pylrn Date: Fri, 25 Sep 2026 10:27:17 +0530 Subject: [PATCH 2/2] chore: bump version to 1.6.2 --- assemblyai/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assemblyai/__version__.py b/assemblyai/__version__.py index f49459c7..51bbb3f2 100644 --- a/assemblyai/__version__.py +++ b/assemblyai/__version__.py @@ -1 +1 @@ -__version__ = "1.6.1" +__version__ = "1.6.2"