@elizaos/plugin-elevenlabs 1.0.0-alpha.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Shaw Walters, aka Moon aka @lalalune
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
File without changes
@@ -0,0 +1,5 @@
1
+ import { Plugin } from '@elizaos/core';
2
+
3
+ declare const elevenLabsPlugin: Plugin;
4
+
5
+ export { elevenLabsPlugin as default, elevenLabsPlugin };
package/dist/index.js ADDED
@@ -0,0 +1,159 @@
1
+ // src/index.ts
2
+ import {
3
+ logger,
4
+ ModelTypes
5
+ } from "@elizaos/core";
6
+ import { Readable } from "node:stream";
7
+
8
+ // src/utils.ts
9
+ import { PassThrough } from "node:stream";
10
+ function getWavHeader(audioLength, sampleRate, channelCount = 1, bitsPerSample = 16) {
11
+ const wavHeader = Buffer.alloc(44);
12
+ wavHeader.write("RIFF", 0);
13
+ wavHeader.writeUInt32LE(36 + audioLength, 4);
14
+ wavHeader.write("WAVE", 8);
15
+ wavHeader.write("fmt ", 12);
16
+ wavHeader.writeUInt32LE(16, 16);
17
+ wavHeader.writeUInt16LE(1, 20);
18
+ wavHeader.writeUInt16LE(channelCount, 22);
19
+ wavHeader.writeUInt32LE(sampleRate, 24);
20
+ wavHeader.writeUInt32LE(sampleRate * bitsPerSample * channelCount / 8, 28);
21
+ wavHeader.writeUInt16LE(bitsPerSample * channelCount / 8, 32);
22
+ wavHeader.writeUInt16LE(bitsPerSample, 34);
23
+ wavHeader.write("data", 36);
24
+ wavHeader.writeUInt32LE(audioLength, 40);
25
+ return wavHeader;
26
+ }
27
+ function prependWavHeader(readable, audioLength, sampleRate, channelCount = 1, bitsPerSample = 16) {
28
+ const wavHeader = getWavHeader(
29
+ audioLength,
30
+ sampleRate,
31
+ channelCount,
32
+ bitsPerSample
33
+ );
34
+ let pushedHeader = false;
35
+ const passThrough = new PassThrough();
36
+ readable.on("data", (data) => {
37
+ if (!pushedHeader) {
38
+ passThrough.push(wavHeader);
39
+ pushedHeader = true;
40
+ }
41
+ passThrough.push(data);
42
+ });
43
+ readable.on("end", () => {
44
+ passThrough.end();
45
+ });
46
+ return passThrough;
47
+ }
48
+
49
+ // src/index.ts
50
+ function getVoiceSettings(runtime) {
51
+ const getSetting = (key, fallback = "") => process.env[key] || runtime.getSetting(key) || fallback;
52
+ return {
53
+ apiKey: getSetting("ELEVENLABS_XI_API_KEY"),
54
+ voiceId: getSetting("ELEVENLABS_VOICE_ID", "EXAVITQu4vr4xnSDxMaL"),
55
+ model: getSetting("ELEVENLABS_MODEL_ID", "eleven_monolingual_v1"),
56
+ stability: getSetting("ELEVENLABS_VOICE_STABILITY", "0.5"),
57
+ latency: getSetting("ELEVENLABS_OPTIMIZE_STREAMING_LATENCY", "0"),
58
+ outputFormat: getSetting("ELEVENLABS_OUTPUT_FORMAT", "pcm_16000"),
59
+ similarity: getSetting("ELEVENLABS_VOICE_SIMILARITY_BOOST", "0.75"),
60
+ style: getSetting("ELEVENLABS_VOICE_STYLE", "0"),
61
+ speakerBoost: getSetting("ELEVENLABS_VOICE_USE_SPEAKER_BOOST", "true")
62
+ };
63
+ }
64
+ async function fetchSpeech(runtime, text) {
65
+ const settings = getVoiceSettings(runtime);
66
+ try {
67
+ const response = await fetch(
68
+ `https://api.elevenlabs.io/v1/text-to-speech/${settings.voiceId}/stream?optimize_streaming_latency=${settings.latency}&output_format=${settings.outputFormat}`,
69
+ {
70
+ method: "POST",
71
+ headers: {
72
+ "Content-Type": "application/json",
73
+ "xi-api-key": settings.apiKey
74
+ },
75
+ body: JSON.stringify({
76
+ model_id: settings.model,
77
+ text,
78
+ voice_settings: {
79
+ similarity_boost: settings.similarity,
80
+ stability: settings.stability,
81
+ style: settings.style,
82
+ use_speaker_boost: settings.speakerBoost
83
+ }
84
+ })
85
+ }
86
+ );
87
+ if (response.status !== 200) {
88
+ const errorBodyString = await response.text();
89
+ const errorBody = JSON.parse(errorBodyString);
90
+ if (response.status === 401 && errorBody.detail?.status === "quota_exceeded") {
91
+ logger.log("ElevenLabs quota exceeded");
92
+ throw new Error("QUOTA_EXCEEDED");
93
+ }
94
+ throw new Error(
95
+ `Received status ${response.status} from Eleven Labs API: ${JSON.stringify(errorBody)}`
96
+ );
97
+ }
98
+ return Readable.fromWeb(response.body);
99
+ } catch (error) {
100
+ throw new Error(error);
101
+ }
102
+ }
103
+ var elevenLabsPlugin = {
104
+ name: "elevenLabs",
105
+ description: "ElevenLabs plugin",
106
+ models: {
107
+ [ModelTypes.TEXT_TO_SPEECH]: async (runtime, text) => {
108
+ try {
109
+ const stream = await fetchSpeech(runtime, text);
110
+ return getVoiceSettings(runtime).outputFormat.startsWith("pcm_") ? prependWavHeader(
111
+ stream,
112
+ 1024 * 1024 * 100,
113
+ Number.parseInt(getVoiceSettings(runtime).outputFormat.slice(4)),
114
+ 1,
115
+ 16
116
+ ) : stream;
117
+ } catch (error) {
118
+ throw new Error(
119
+ `Failed to fetch speech from Eleven Labs API: ${error.message || "Unknown error occurred"}`
120
+ );
121
+ }
122
+ }
123
+ },
124
+ tests: [
125
+ {
126
+ name: "test eleven labs",
127
+ tests: [
128
+ {
129
+ name: "Eleven Labs API key validation",
130
+ fn: async (runtime) => {
131
+ if (!getVoiceSettings(runtime).apiKey) {
132
+ throw new Error(
133
+ "Missing API key: Please provide a valid Eleven Labs API key."
134
+ );
135
+ }
136
+ }
137
+ },
138
+ {
139
+ name: "Eleven Labs API response",
140
+ fn: async (runtime) => {
141
+ try {
142
+ await fetchSpeech(runtime, "test");
143
+ } catch (error) {
144
+ throw new Error(
145
+ `Failed to fetch speech from Eleven Labs API: ${error.message || "Unknown error occurred"}`
146
+ );
147
+ }
148
+ }
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ };
154
+ var index_default = elevenLabsPlugin;
155
+ export {
156
+ index_default as default,
157
+ elevenLabsPlugin
158
+ };
159
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/utils.ts"],"sourcesContent":["import {\n\ttype IAgentRuntime,\n\ttype Plugin,\n\tlogger,\n\tModelTypes,\n} from \"@elizaos/core\";\nimport { Readable } from \"node:stream\";\nimport { prependWavHeader } from \"./utils.ts\";\n\nfunction getVoiceSettings(runtime: IAgentRuntime) {\n\tconst getSetting = (key: string, fallback = \"\") =>\n\t\tprocess.env[key] || runtime.getSetting(key) || fallback;\n\n\treturn {\n\t\tapiKey: getSetting(\"ELEVENLABS_XI_API_KEY\"),\n\t\tvoiceId: getSetting(\"ELEVENLABS_VOICE_ID\", \"EXAVITQu4vr4xnSDxMaL\"),\n\t\tmodel: getSetting(\"ELEVENLABS_MODEL_ID\", \"eleven_monolingual_v1\"),\n\t\tstability: getSetting(\"ELEVENLABS_VOICE_STABILITY\", \"0.5\"),\n\t\tlatency: getSetting(\"ELEVENLABS_OPTIMIZE_STREAMING_LATENCY\", \"0\"),\n\t\toutputFormat: getSetting(\"ELEVENLABS_OUTPUT_FORMAT\", \"pcm_16000\"),\n\t\tsimilarity: getSetting(\"ELEVENLABS_VOICE_SIMILARITY_BOOST\", \"0.75\"),\n\t\tstyle: getSetting(\"ELEVENLABS_VOICE_STYLE\", \"0\"),\n\t\tspeakerBoost: getSetting(\"ELEVENLABS_VOICE_USE_SPEAKER_BOOST\", \"true\"),\n\t};\n}\n\nasync function fetchSpeech(runtime: IAgentRuntime, text: string) {\n\tconst settings = getVoiceSettings(runtime);\n\ttry {\n\t\tconst response = await fetch(\n\t\t\t`https://api.elevenlabs.io/v1/text-to-speech/${settings.voiceId}/stream?optimize_streaming_latency=${settings.latency}&output_format=${settings.outputFormat}`,\n\t\t\t{\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t\"xi-api-key\": settings.apiKey,\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tmodel_id: settings.model,\n\t\t\t\t\ttext,\n\t\t\t\t\tvoice_settings: {\n\t\t\t\t\t\tsimilarity_boost: settings.similarity,\n\t\t\t\t\t\tstability: settings.stability,\n\t\t\t\t\t\tstyle: settings.style,\n\t\t\t\t\t\tuse_speaker_boost: settings.speakerBoost,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t},\n\t\t);\n\t\tif (response.status !== 200) {\n\t\t\tconst errorBodyString = await response.text();\n\t\t\tconst errorBody = JSON.parse(errorBodyString);\n\n\t\t\tif (\n\t\t\t\tresponse.status === 401 &&\n\t\t\t\terrorBody.detail?.status === \"quota_exceeded\"\n\t\t\t) {\n\t\t\t\tlogger.log(\"ElevenLabs quota exceeded\");\n\t\t\t\tthrow new Error(\"QUOTA_EXCEEDED\");\n\t\t\t}\n\t\t\tthrow new Error(\n\t\t\t\t`Received status ${response.status} from Eleven Labs API: ${JSON.stringify(errorBody)}`,\n\t\t\t);\n\t\t}\n\t\treturn Readable.fromWeb(response.body);\n\t} catch (error) {\n\t\tthrow new Error(error);\n\t}\n}\n\nexport const elevenLabsPlugin: Plugin = {\n\tname: \"elevenLabs\",\n\tdescription: \"ElevenLabs plugin\",\n\tmodels: {\n\t\t[ModelTypes.TEXT_TO_SPEECH]: async (runtime, text) => {\n\t\t\ttry {\n\t\t\t\tconst stream = await fetchSpeech(runtime, text);\n\t\t\t\treturn getVoiceSettings(runtime).outputFormat.startsWith(\"pcm_\")\n\t\t\t\t\t? prependWavHeader(\n\t\t\t\t\t\t\tstream,\n\t\t\t\t\t\t\t1024 * 1024 * 100,\n\t\t\t\t\t\t\tNumber.parseInt(getVoiceSettings(runtime).outputFormat.slice(4)),\n\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t16,\n\t\t\t\t\t\t)\n\t\t\t\t\t: stream;\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Failed to fetch speech from Eleven Labs API: ${error.message || \"Unknown error occurred\"}`,\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n\ttests: [\n\t\t{\n\t\t\tname: \"test eleven labs\",\n\t\t\ttests: [\n\t\t\t\t{\n\t\t\t\t\tname: \"Eleven Labs API key validation\",\n\t\t\t\t\tfn: async (runtime: IAgentRuntime) => {\n\t\t\t\t\t\tif (!getVoiceSettings(runtime).apiKey) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\"Missing API key: Please provide a valid Eleven Labs API key.\",\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: \"Eleven Labs API response\",\n\t\t\t\t\tfn: async (runtime: IAgentRuntime) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait fetchSpeech(runtime, \"test\");\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t`Failed to fetch speech from Eleven Labs API: ${error.message || \"Unknown error occurred\"}`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n};\nexport default elevenLabsPlugin;\n","import { PassThrough } from \"node:stream\";\nimport type { Readable } from \"node:stream\";\n\nexport function getWavHeader(\n\taudioLength: number,\n\tsampleRate: number,\n\tchannelCount = 1,\n\tbitsPerSample = 16,\n): Buffer {\n\tconst wavHeader = Buffer.alloc(44);\n\twavHeader.write(\"RIFF\", 0);\n\twavHeader.writeUInt32LE(36 + audioLength, 4); // Length of entire file in bytes minus 8\n\twavHeader.write(\"WAVE\", 8);\n\twavHeader.write(\"fmt \", 12);\n\twavHeader.writeUInt32LE(16, 16); // Length of format data\n\twavHeader.writeUInt16LE(1, 20); // Type of format (1 is PCM)\n\twavHeader.writeUInt16LE(channelCount, 22); // Number of channels\n\twavHeader.writeUInt32LE(sampleRate, 24); // Sample rate\n\twavHeader.writeUInt32LE((sampleRate * bitsPerSample * channelCount) / 8, 28); // Byte rate\n\twavHeader.writeUInt16LE((bitsPerSample * channelCount) / 8, 32); // Block align ((BitsPerSample * Channels) / 8)\n\twavHeader.writeUInt16LE(bitsPerSample, 34); // Bits per sample\n\twavHeader.write(\"data\", 36); // Data chunk header\n\twavHeader.writeUInt32LE(audioLength, 40); // Data chunk size\n\treturn wavHeader;\n}\n\nexport function prependWavHeader(\n\treadable: Readable,\n\taudioLength: number,\n\tsampleRate: number,\n\tchannelCount = 1,\n\tbitsPerSample = 16,\n): Readable {\n\tconst wavHeader = getWavHeader(\n\t\taudioLength,\n\t\tsampleRate,\n\t\tchannelCount,\n\t\tbitsPerSample,\n\t);\n\tlet pushedHeader = false;\n\tconst passThrough = new PassThrough();\n\treadable.on(\"data\", (data) => {\n\t\tif (!pushedHeader) {\n\t\t\tpassThrough.push(wavHeader);\n\t\t\tpushedHeader = true;\n\t\t}\n\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plugin-elevenlabs",
3
+ "version": "1.0.0-alpha.0",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ }
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "dependencies": {
21
+ "@elizaos/core": "1.0.0-alpha.0",
22
+ "tsup": "8.4.0"
23
+ },
24
+ "scripts": {
25
+ "build": "tsup --format esm --dts",
26
+ "dev": "tsup --format esm --dts --watch",
27
+ "test": "vitest run"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "agentConfig": {
33
+ "pluginType": "elizaos:plugin:1.0.0",
34
+ "pluginParameters": {
35
+ "ELEVENLABS_XI_API_KEY": {
36
+ "type": "string",
37
+ "description": "API key for ElevenLabs."
38
+ },
39
+ "ELEVENLABS_VOICE_ID": {
40
+ "type": "string",
41
+ "description": "Optional. Voice selection ID."
42
+ },
43
+ "ELEVENLABS_MODEL_ID": {
44
+ "type": "string",
45
+ "description": "Optional. Speech model ID."
46
+ },
47
+ "ELEVENLABS_VOICE_STABILITY": {
48
+ "type": "string",
49
+ "description": "Optional. Controls voice stability."
50
+ },
51
+ "ELEVENLABS_OPTIMIZE_STREAMING_LATENCY": {
52
+ "type": "string",
53
+ "description": "Optional. Adjusts streaming latency."
54
+ },
55
+ "ELEVENLABS_OUTPUT_FORMAT": {
56
+ "type": "string",
57
+ "description": "Optional. Output format (e.g., pcm_16000)."
58
+ },
59
+ "ELEVENLABS_VOICE_SIMILARITY_BOOST": {
60
+ "type": "string",
61
+ "description": "Optional. Adjusts similarity to the reference voice (0-1)."
62
+ },
63
+ "ELEVENLABS_VOICE_STYLE": {
64
+ "type": "string",
65
+ "description": "Optional. Controls voice style intensity (0-1)."
66
+ },
67
+ "ELEVENLABS_VOICE_USE_SPEAKER_BOOST": {
68
+ "type": "string",
69
+ "description": "Optional. Enhances speaker presence (true/false)."
70
+ }
71
+ }
72
+ },
73
+ "gitHead": "084c3b06c279b85528a81d42fc93ef68ff9f7364"
74
+ }