@livekit/agents-plugin-assemblyai 0.0.0 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/stt.test.js CHANGED
@@ -1,10 +1,16 @@
1
- import { initializeLogger } from "@livekit/agents";
2
1
  import { VAD } from "@livekit/agents-plugin-silero";
3
2
  import { stt } from "@livekit/agents-plugins-test";
4
- import { describe } from "vitest";
3
+ import { describe, it } from "vitest";
5
4
  import { STT } from "./stt.js";
6
- describe("AssemblyAI", async () => {
7
- initializeLogger({ pretty: false });
8
- await stt(new STT(), await VAD.load(), { nonStreaming: false });
9
- });
5
+ const hasAssemblyAIApiKey = Boolean(process.env.ASSEMBLYAI_API_KEY);
6
+ if (hasAssemblyAIApiKey) {
7
+ describe("AssemblyAI", async () => {
8
+ await stt(new STT(), await VAD.load(), { nonStreaming: false });
9
+ });
10
+ } else {
11
+ describe("AssemblyAI", () => {
12
+ it.skip("requires ASSEMBLYAI_API_KEY", () => {
13
+ });
14
+ });
15
+ }
10
16
  //# sourceMappingURL=stt.test.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/stt.test.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { initializeLogger } from '@livekit/agents';\nimport { VAD } from '@livekit/agents-plugin-silero';\nimport { stt } from '@livekit/agents-plugins-test';\nimport { describe } from 'vitest';\nimport { STT } from './stt.js';\n\ndescribe('AssemblyAI', async () => {\n initializeLogger({ pretty: false });\n await stt(new STT(), await VAD.load(), { nonStreaming: false });\n});\n"],"mappings":"AAGA,SAAS,wBAAwB;AACjC,SAAS,WAAW;AACpB,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,WAAW;AAEpB,SAAS,cAAc,YAAY;AACjC,mBAAiB,EAAE,QAAQ,MAAM,CAAC;AAClC,QAAM,IAAI,IAAI,IAAI,GAAG,MAAM,IAAI,KAAK,GAAG,EAAE,cAAc,MAAM,CAAC;AAChE,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/stt.test.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2026 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { VAD } from '@livekit/agents-plugin-silero';\nimport { stt } from '@livekit/agents-plugins-test';\nimport { describe, it } from 'vitest';\nimport { STT } from './stt.js';\n\nconst hasAssemblyAIApiKey = Boolean(process.env.ASSEMBLYAI_API_KEY);\n\nif (hasAssemblyAIApiKey) {\n describe('AssemblyAI', async () => {\n await stt(new STT(), await VAD.load(), { nonStreaming: false });\n });\n} else {\n describe('AssemblyAI', () => {\n it.skip('requires ASSEMBLYAI_API_KEY', () => {});\n });\n}\n"],"mappings":"AAGA,SAAS,WAAW;AACpB,SAAS,WAAW;AACpB,SAAS,UAAU,UAAU;AAC7B,SAAS,WAAW;AAEpB,MAAM,sBAAsB,QAAQ,QAAQ,IAAI,kBAAkB;AAElE,IAAI,qBAAqB;AACvB,WAAS,cAAc,YAAY;AACjC,UAAM,IAAI,IAAI,IAAI,GAAG,MAAM,IAAI,KAAK,GAAG,EAAE,cAAc,MAAM,CAAC;AAAA,EAChE,CAAC;AACH,OAAO;AACL,WAAS,cAAc,MAAM;AAC3B,OAAG,KAAK,+BAA+B,MAAM;AAAA,IAAC,CAAC;AAAA,EACjD,CAAC;AACH;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livekit/agents-plugin-assemblyai",
3
- "version": "0.0.0",
3
+ "version": "1.2.7",
4
4
  "description": "AssemblyAI plugin for LiveKit Agents for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "require": "dist/index.cjs",
@@ -25,20 +25,21 @@
25
25
  "README.md"
26
26
  ],
27
27
  "devDependencies": {
28
- "@livekit/agents": "^x",
29
- "@livekit/agents-plugin-silero": "^x",
30
- "@livekit/agents-plugins-test": "^x",
31
- "@livekit/rtc-node": "^0.13.4",
28
+ "@livekit/rtc-node": "^0.13.25",
32
29
  "@microsoft/api-extractor": "^7.35.0",
30
+ "@types/ws": "^8.5.10",
33
31
  "tsup": "^8.3.5",
34
- "typescript": "^5.0.0"
32
+ "typescript": "^5.0.0",
33
+ "@livekit/agents": "1.2.7",
34
+ "@livekit/agents-plugin-silero": "1.2.7",
35
+ "@livekit/agents-plugins-test": "1.2.7"
35
36
  },
36
37
  "dependencies": {
37
- "assemblyai": "^4.9.0"
38
+ "ws": "^8.16.0"
38
39
  },
39
40
  "peerDependencies": {
40
- "@livekit/rtc-node": "^0.13.4",
41
- "@livekit/agents": "^0.7.7x"
41
+ "@livekit/rtc-node": "^0.13.25",
42
+ "@livekit/agents": "1.2.7"
42
43
  },
43
44
  "scripts": {
44
45
  "build": "tsup --onSuccess \"pnpm build:types\"",
package/src/index.ts CHANGED
@@ -1,5 +1,19 @@
1
- // SPDX-FileCopyrightText: 2024 LiveKit, Inc.
1
+ // SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
+ import { Plugin } from '@livekit/agents';
4
5
 
6
+ export * from './models.js';
5
7
  export * from './stt.js';
8
+
9
+ class AssemblyAIPlugin extends Plugin {
10
+ constructor() {
11
+ super({
12
+ title: 'assemblyai',
13
+ version: __PACKAGE_VERSION__,
14
+ package: __PACKAGE_NAME__,
15
+ });
16
+ }
17
+ }
18
+
19
+ Plugin.registerPlugin(new AssemblyAIPlugin());
package/src/models.ts ADDED
@@ -0,0 +1,14 @@
1
+ // SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ export type STTModels =
6
+ | 'universal-streaming-english'
7
+ | 'universal-streaming-multilingual'
8
+ | 'u3-rt-pro'
9
+ // Deprecated alias — AssemblyAI maps this to `u3-rt-pro` server-side, but the
10
+ // Python plugin emits a warning and rewrites it. Kept here so TS users don't
11
+ // break if they already pass it.
12
+ | 'u3-pro';
13
+
14
+ export type STTEncoding = 'pcm_s16le' | 'pcm_mulaw';
package/src/stt.test.ts CHANGED
@@ -1,13 +1,19 @@
1
- // SPDX-FileCopyrightText: 2024 LiveKit, Inc.
1
+ // SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
- import { initializeLogger } from '@livekit/agents';
5
4
  import { VAD } from '@livekit/agents-plugin-silero';
6
5
  import { stt } from '@livekit/agents-plugins-test';
7
- import { describe } from 'vitest';
6
+ import { describe, it } from 'vitest';
8
7
  import { STT } from './stt.js';
9
8
 
10
- describe('AssemblyAI', async () => {
11
- initializeLogger({ pretty: false });
12
- await stt(new STT(), await VAD.load(), { nonStreaming: false });
13
- });
9
+ const hasAssemblyAIApiKey = Boolean(process.env.ASSEMBLYAI_API_KEY);
10
+
11
+ if (hasAssemblyAIApiKey) {
12
+ describe('AssemblyAI', async () => {
13
+ await stt(new STT(), await VAD.load(), { nonStreaming: false });
14
+ });
15
+ } else {
16
+ describe('AssemblyAI', () => {
17
+ it.skip('requires ASSEMBLYAI_API_KEY', () => {});
18
+ });
19
+ }