From a50c477beb1f8a6ff04726c45a86eab5d8035806 Mon Sep 17 00:00:00 2001 From: AssemblyAI Date: Mon, 15 Jun 2026 09:57:50 -0600 Subject: [PATCH] Project import generated by Copybara. GitOrigin-RevId: 5a3e58c4adf7f3fc384336603c30353161504fe6 --- README.md | 3 --- package.json | 2 +- src/types/streaming/index.ts | 1 + tests/unit/streaming.test.ts | 17 +++++++++++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index af0b96c..85ecab1 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,6 @@ The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting which supports async and streaming transcription. It is written primarily for Node.js in TypeScript with all types exported, but also [compatible with other runtimes](./docs/compat.md). -> **⚠️ WARNING** -> This SDK is intended for **testing and light usage only**. It is not recommended for use at scale or with production traffic. For best results, we recommend calling the AssemblyAI API directly via HTTP request. See our [official documentation](https://www.assemblyai.com/docs) for more information, including HTTP code examples. - ## Claude Code This repository includes a [`CLAUDE.md`](CLAUDE.md) file that provides context to Claude Code about this SDK — key APIs, common patterns, and gotchas. When you open this repo in Claude Code, it automatically reads this file to give better assistance. diff --git a/package.json b/package.json index 0f99326..a706d87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "assemblyai", - "version": "4.34.5", + "version": "4.34.6", "description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.", "engines": { "node": ">=18" diff --git a/src/types/streaming/index.ts b/src/types/streaming/index.ts index e24557b..fc2a5aa 100644 --- a/src/types/streaming/index.ts +++ b/src/types/streaming/index.ts @@ -172,6 +172,7 @@ export type StreamingSpeechModel = | "u3-rt-pro" | "u3-rt-pro-beta-1" | "whisper-rt" + | "universal-3-5-pro" | "u3-pro"; export type StreamingDomain = "medical-v1"; diff --git a/tests/unit/streaming.test.ts b/tests/unit/streaming.test.ts index 4914453..1ad0bf4 100644 --- a/tests/unit/streaming.test.ts +++ b/tests/unit/streaming.test.ts @@ -338,6 +338,23 @@ describe("streaming", () => { await connect(rt, server); }); + it("should include universal-3-5-pro speech model in connection URL", async () => { + await cleanup(); + WS.clean(); + + const wsUrl = `${websocketBaseUrl}?token=123&sample_rate=16000&speech_model=universal-3-5-pro`; + server = new WS(wsUrl); + rt = new StreamingTranscriber({ + websocketBaseUrl, + token: "123", + sampleRate: 16_000, + speechModel: "universal-3-5-pro" 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));