From 3afa7a7c7c10ce3041d47e14319bca5aa850dc95 Mon Sep 17 00:00:00 2001 From: Carter Campbell Date: Thu, 12 Nov 2026 12:30:44 -0700 Subject: [PATCH 1/2] feat(streaming): add assemblyai-stt-3-7-realtime speech models Adds assemblyai-stt-3-7-realtime (note taking) and assemblyai-stt-3-7-realtime-agent (voice agents) for the Universal 3.7 launch. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/types/streaming/index.ts | 2 ++ tests/unit/streaming.test.ts | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a2242..07640bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [4.43.2] + +- Add `assemblyai-stt-3-7-realtime` (note taking) and `assemblyai-stt-3-7-realtime-agent` (voice agents) to the streaming `speechModel` options (`StreamingSpeechModel`) + ## [4.43.1] - `client.tts.synthesize()` and `client.tts.stream()` send the camelCase names `voiceId`, `modelId`, `sampleRate`, `bitRate` and `extendBiometricConsent`, which plain JavaScript can pass, as their snake_case request fields (`voice_id`, ...) and warn once. The API ignored them before, so such a request got the default voice, model or sample rate. These values now reach the API, so a value it refuses (a `sampleRate` outside the supported set, `bitRate` without the `mp3` encoding, `extendBiometricConsent` on a voice the account does not own) fails with the same `TextToSpeechError` as its snake_case spelling, where before the request used the default. When a request gives both names of a field with different values, the snake_case value is sent, with a warning once. A `TextToSpeechSession` warns once on the snake_case names it ignores (`voice_id`, `model_id`, `sample_rate`, `extend_biometric_consent`, `word_boundaries`, `inactivity_timeout`) diff --git a/package.json b/package.json index e9d9913..fb768a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "assemblyai", - "version": "4.43.1", + "version": "4.43.2", "description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription and text-to-speech.", "engines": { "node": ">=18" diff --git a/src/types/streaming/index.ts b/src/types/streaming/index.ts index ef8fc55..df12cda 100644 --- a/src/types/streaming/index.ts +++ b/src/types/streaming/index.ts @@ -232,6 +232,8 @@ export type StreamingSpeechModel = | "universal-3-5-pro" | "universal-3-6" | "universal-3-6-pro" + | "assemblyai-stt-3-7-realtime" + | "assemblyai-stt-3-7-realtime-agent" | "u3-pro"; export type StreamingDomain = "medical-v1" | "veterinary-v1"; diff --git a/tests/unit/streaming.test.ts b/tests/unit/streaming.test.ts index 7d15ae2..ee1093e 100644 --- a/tests/unit/streaming.test.ts +++ b/tests/unit/streaming.test.ts @@ -597,6 +597,40 @@ describe("streaming", () => { await connect(rt, server); }); + it("should include assemblyai-stt-3-7-realtime speech model in connection URL", async () => { + await cleanup(); + WS.clean(); + + const wsUrl = `${websocketBaseUrl}?token=123&sample_rate=16000&speech_model=assemblyai-stt-3-7-realtime`; + server = new WS(wsUrl); + rt = new StreamingTranscriber({ + websocketBaseUrl, + token: "123", + sampleRate: 16_000, + speechModel: "assemblyai-stt-3-7-realtime" as const, + }); + onOpen = jest.fn(); + rt.on("open", onOpen); + await connect(rt, server); + }); + + it("should include assemblyai-stt-3-7-realtime-agent speech model in connection URL", async () => { + await cleanup(); + WS.clean(); + + const wsUrl = `${websocketBaseUrl}?token=123&sample_rate=16000&speech_model=assemblyai-stt-3-7-realtime-agent`; + server = new WS(wsUrl); + rt = new StreamingTranscriber({ + websocketBaseUrl, + token: "123", + sampleRate: 16_000, + speechModel: "assemblyai-stt-3-7-realtime-agent" as const, + }); + onOpen = jest.fn(); + rt.on("open", onOpen); + await connect(rt, server); + }); + it("should parse speaker_label from turn event", async () => { const turnPromise = new Promise<{ speaker_label?: string }>((resolve) => { rt.on("turn", (event) => resolve(event)); From 1c1736ca66a7a980856fdf523a40b5b81c230b93 Mon Sep 17 00:00:00 2001 From: Carter Campbell Date: Mon, 16 Nov 2026 09:44:30 -0700 Subject: [PATCH 2/2] feat(streaming): add "manual" streaming mode The streaming API accepts mode=manual (client ends turns with ForceEndpoint) on the universal-3 pro models, including assemblyai-stt-3-7-realtime(-agent). Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + src/types/streaming/index.ts | 6 +++++- tests/unit/streaming.test.ts | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07640bc..58a6f7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [4.43.2] - Add `assemblyai-stt-3-7-realtime` (note taking) and `assemblyai-stt-3-7-realtime-agent` (voice agents) to the streaming `speechModel` options (`StreamingSpeechModel`) +- Add `"manual"` to the streaming `StreamingMode` type: the client ends each turn with `forceEndpoint()` ## [4.43.1] diff --git a/src/types/streaming/index.ts b/src/types/streaming/index.ts index df12cda..01cc24c 100644 --- a/src/types/streaming/index.ts +++ b/src/types/streaming/index.ts @@ -238,7 +238,11 @@ export type StreamingSpeechModel = export type StreamingDomain = "medical-v1" | "veterinary-v1"; -export type StreamingMode = "max_accuracy" | "min_latency" | "balanced"; +export type StreamingMode = + | "max_accuracy" + | "min_latency" + | "balanced" + | "manual"; export type VoiceFocusModel = "near-field" | "far-field"; diff --git a/tests/unit/streaming.test.ts b/tests/unit/streaming.test.ts index ee1093e..bdec802 100644 --- a/tests/unit/streaming.test.ts +++ b/tests/unit/streaming.test.ts @@ -399,6 +399,24 @@ describe("streaming", () => { await connect(rt, server); }); + it("should include mode=manual in connection URL", async () => { + await cleanup(); + WS.clean(); + + const wsUrl = `${websocketBaseUrl}?token=123&sample_rate=16000&speech_model=assemblyai-stt-3-7-realtime-agent&mode=manual`; + server = new WS(wsUrl); + rt = new StreamingTranscriber({ + websocketBaseUrl, + token: "123", + sampleRate: 16_000, + speechModel: "assemblyai-stt-3-7-realtime-agent", + mode: "manual", + }); + onOpen = jest.fn(); + rt.on("open", onOpen); + await connect(rt, server); + }); + it.each(["medical-v1", "veterinary-v1"] as const)( "should include domain=%s in connection URL", async (domain) => {