@livekit/agents-plugin-meta 1.8.0
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/README.md +47 -0
- package/dist/index.cjs +42 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/log.cjs +30 -0
- package/dist/log.cjs.map +1 -0
- package/dist/log.d.cts +3 -0
- package/dist/log.d.ts +3 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +6 -0
- package/dist/log.js.map +1 -0
- package/dist/stt.cjs +858 -0
- package/dist/stt.cjs.map +1 -0
- package/dist/stt.d.cts +77 -0
- package/dist/stt.d.ts +77 -0
- package/dist/stt.d.ts.map +1 -0
- package/dist/stt.js +835 -0
- package/dist/stt.js.map +1 -0
- package/dist/stt.test.d.cts +2 -0
- package/dist/stt.test.d.ts +2 -0
- package/dist/stt.test.d.ts.map +1 -0
- package/package.json +62 -0
- package/src/index.ts +19 -0
- package/src/log.ts +6 -0
- package/src/stt.test.ts +782 -0
- package/src/stt.ts +974 -0
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
|
|
3
|
+
|
|
4
|
+
SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# Meta plugin for LiveKit Agents
|
|
8
|
+
|
|
9
|
+
Support for Meta [Muse Voice Transcribe](https://dev.meta.ai/docs/speech-to-text) using its [realtime streaming speech-to-text interface](https://dev.meta.ai/docs/api-reference/voice/realtime).
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @livekit/agents-plugin-meta
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Pre-requisites
|
|
18
|
+
|
|
19
|
+
Set a Meta Model API key in your environment using either variable:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
MODEL_API_KEY=<your_model_api_key>
|
|
23
|
+
# Or: META_API_KEY=<your_model_api_key>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
You can also pass the key directly with `apiKey`. The resolution order is `apiKey`, `MODEL_API_KEY`, then `META_API_KEY`.
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { voice } from '@livekit/agents';
|
|
32
|
+
import * as meta from '@livekit/agents-plugin-meta';
|
|
33
|
+
|
|
34
|
+
const session = new voice.AgentSession({
|
|
35
|
+
stt: new meta.STT({
|
|
36
|
+
keywords: ['LiveKit', 'Muse'],
|
|
37
|
+
languageBias: ['English'],
|
|
38
|
+
}),
|
|
39
|
+
// ... llm, tts, etc.
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The plugin supports streaming recognition with server-side endpointing, cumulative interim transcripts, and mono PCM16 audio at 24 kHz. Connected streams must keep sending real-time PCM, including silence. `keywords` and `languageBias` are static hints applied during the initial handshake and cannot be changed on an active stream. Omit `languageBias` for automatic language detection.
|
|
44
|
+
|
|
45
|
+
Supported language names are: Arabic, Bengali, Dutch, English, French, German, Hebrew, Hindi, Indonesian, Italian, Japanese, Kannada, Korean, Malay, Mandarin Chinese, Marathi, Polish, Portuguese, Spanish, Tagalog, Tamil, Telugu, Thai, Turkish, and Vietnamese. The per-stream `language` option also accepts corresponding language codes and locales, such as `en-US`, `pt-BR`, and `zh-CN`, and maps them to the documented names.
|
|
46
|
+
|
|
47
|
+
Muse realtime sessions have a maximum duration of 60 minutes. This plugin reports the provider close and does not rotate an active LiveKit speech stream automatically; start a new stream to continue. Batch recognition, diarization, detected-language metadata, and active-stream keyterm updates are not supported.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
__export(index_exports, {
|
|
21
|
+
STT: () => import_stt.STT,
|
|
22
|
+
SpeechStream: () => import_stt.SpeechStream
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(index_exports);
|
|
25
|
+
var import_agents = require("@livekit/agents");
|
|
26
|
+
var import_stt = require("./stt.cjs");
|
|
27
|
+
class MetaPlugin extends import_agents.Plugin {
|
|
28
|
+
constructor() {
|
|
29
|
+
super({
|
|
30
|
+
title: "meta",
|
|
31
|
+
version: "1.8.0",
|
|
32
|
+
package: "@livekit/agents-plugin-meta"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
import_agents.Plugin.registerPlugin(new MetaPlugin());
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
STT,
|
|
40
|
+
SpeechStream
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2026 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { Plugin } from '@livekit/agents';\n\nexport { STT, SpeechStream } from './stt.js';\nexport type { STTOptions, SpeechStreamOptions, WebSocketFactory } from './stt.js';\n\nclass MetaPlugin extends Plugin {\n constructor() {\n super({\n title: 'meta',\n version: __PACKAGE_VERSION__,\n package: __PACKAGE_NAME__,\n });\n }\n}\n\nPlugin.registerPlugin(new MetaPlugin());\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAuB;AAEvB,iBAAkC;AAGlC,MAAM,mBAAmB,qBAAO;AAAA,EAC9B,cAAc;AACZ,UAAM;AAAA,MACJ,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACF;AAEA,qBAAO,eAAe,IAAI,WAAW,CAAC;","names":[]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Plugin } from "@livekit/agents";
|
|
2
|
+
import { STT, SpeechStream } from "./stt.js";
|
|
3
|
+
class MetaPlugin extends Plugin {
|
|
4
|
+
constructor() {
|
|
5
|
+
super({
|
|
6
|
+
title: "meta",
|
|
7
|
+
version: "1.8.0",
|
|
8
|
+
package: "@livekit/agents-plugin-meta"
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
Plugin.registerPlugin(new MetaPlugin());
|
|
13
|
+
export {
|
|
14
|
+
STT,
|
|
15
|
+
SpeechStream
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2026 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { Plugin } from '@livekit/agents';\n\nexport { STT, SpeechStream } from './stt.js';\nexport type { STTOptions, SpeechStreamOptions, WebSocketFactory } from './stt.js';\n\nclass MetaPlugin extends Plugin {\n constructor() {\n super({\n title: 'meta',\n version: __PACKAGE_VERSION__,\n package: __PACKAGE_NAME__,\n });\n }\n}\n\nPlugin.registerPlugin(new MetaPlugin());\n"],"mappings":"AAGA,SAAS,cAAc;AAEvB,SAAS,KAAK,oBAAoB;AAGlC,MAAM,mBAAmB,OAAO;AAAA,EAC9B,cAAc;AACZ,UAAM;AAAA,MACJ,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AACF;AAEA,OAAO,eAAe,IAAI,WAAW,CAAC;","names":[]}
|
package/dist/log.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var log_exports = {};
|
|
20
|
+
__export(log_exports, {
|
|
21
|
+
log: () => log
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(log_exports);
|
|
24
|
+
var import_agents = require("@livekit/agents");
|
|
25
|
+
const log = () => (0, import_agents.log)().child({ plugin: "meta" });
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
log
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=log.cjs.map
|
package/dist/log.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/log.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2026 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { log as agentsLog } from '@livekit/agents';\n\nexport const log = (): ReturnType<typeof agentsLog> => agentsLog().child({ plugin: 'meta' });\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAiC;AAE1B,MAAM,MAAM,UAAoC,cAAAA,KAAU,EAAE,MAAM,EAAE,QAAQ,OAAO,CAAC;","names":["agentsLog"]}
|
package/dist/log.d.cts
ADDED
package/dist/log.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEnD,eAAO,MAAM,GAAG,QAAO,UAAU,CAAC,OAAO,SAAS,CAA0C,CAAC"}
|
package/dist/log.js
ADDED
package/dist/log.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/log.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2026 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { log as agentsLog } from '@livekit/agents';\n\nexport const log = (): ReturnType<typeof agentsLog> => agentsLog().child({ plugin: 'meta' });\n"],"mappings":"AAGA,SAAS,OAAO,iBAAiB;AAE1B,MAAM,MAAM,MAAoC,UAAU,EAAE,MAAM,EAAE,QAAQ,OAAO,CAAC;","names":[]}
|