Skip to content

feat(streaming): add speaker_labels_revision_interval_ms param - #260

Merged
ccampbell-aai merged 2 commits into
masterfrom
ccampbell/speaker-labels-revision-interval
Sep 24, 2026
Merged

ccampbell-aai merged 2 commits into
masterfrom
ccampbell/speaker-labels-revision-interval

Conversation

@ccampbell-aai

Copy link
Copy Markdown
Contributor

Adds speaker_labels_revision_interval_ms to RealTimeParameters, sent as a connect query param. Sets how often (ms of audio) the server emits mid-stream SpeakerRevision events when speaker_labels is enabled. Unset or 0 = end-of-stream revision only. Python counterpart to assemblyai-node-sdk#188.

RealTimeParameters(sample_rate=16000, speech_model="universal-3-5-pro",
                   speaker_labels=True, speaker_labels_revision_interval_ms=120_000)

Version 1.6.1.

Test plan

  • Unit tests: param in URL, explicit 0 kept, unset omitted, negative rejected, large value passed through; async twin
  • Passes under pydantic 2.13 and 1.10
  • Prod: 281 s two-speaker stream got mid-stream revisions at 123.7 s and 251.4 s; control without the param got the end-of-stream revision only

🤖 Generated with Claude Code

Connect-time cadence for mid-stream SpeakerRevision events when
speaker_labels is enabled. Mirrors Node SDK #188. Version 1.6.1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ccampbell-aai
ccampbell-aai marked this pull request as ready for review September 24, 2026 16:32
Comment thread assemblyai/streaming/v3/models.py Outdated
@ccampbell-aai
ccampbell-aai merged commit 0c43279 into master Sep 24, 2026
8 checks passed
@ccampbell-aai
ccampbell-aai deleted the ccampbell/speaker-labels-revision-interval branch September 24, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants