@elevenlabs/client 0.1.5
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 +21 -0
- package/README.md +326 -0
- package/dist/BaseConversation.d.ts +75 -0
- package/dist/TextConversation.d.ts +4 -0
- package/dist/VoiceConversation.d.ts +27 -0
- package/dist/index.d.ts +9 -0
- package/dist/lib.cjs +2 -0
- package/dist/lib.cjs.map +1 -0
- package/dist/lib.modern.js +2 -0
- package/dist/lib.modern.js.map +1 -0
- package/dist/lib.module.js +2 -0
- package/dist/lib.module.js.map +1 -0
- package/dist/lib.umd.js +2 -0
- package/dist/lib.umd.js.map +1 -0
- package/dist/utils/applyDelay.d.ts +2 -0
- package/dist/utils/audio.d.ts +2 -0
- package/dist/utils/audioConcatProcessor.d.ts +1 -0
- package/dist/utils/compatibility.d.ts +2 -0
- package/dist/utils/connection.d.ts +70 -0
- package/dist/utils/createWorkletModuleLoader.d.ts +1 -0
- package/dist/utils/events.d.ts +108 -0
- package/dist/utils/input.d.ts +14 -0
- package/dist/utils/output.d.ts +10 -0
- package/dist/utils/postOverallFeedback.d.ts +1 -0
- package/dist/utils/rawAudioProcessor.d.ts +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormatConfig } from "./connection";
|
|
2
|
+
export type InputConfig = {
|
|
3
|
+
preferHeadphonesForIosDevices?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class Input {
|
|
6
|
+
readonly context: AudioContext;
|
|
7
|
+
readonly analyser: AnalyserNode;
|
|
8
|
+
readonly worklet: AudioWorkletNode;
|
|
9
|
+
readonly inputStream: MediaStream;
|
|
10
|
+
static create({ sampleRate, format, preferHeadphonesForIosDevices, }: FormatConfig & InputConfig): Promise<Input>;
|
|
11
|
+
private constructor();
|
|
12
|
+
close(): Promise<void>;
|
|
13
|
+
setMuted(isMuted: boolean): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormatConfig } from "./connection";
|
|
2
|
+
export declare class Output {
|
|
3
|
+
readonly context: AudioContext;
|
|
4
|
+
readonly analyser: AnalyserNode;
|
|
5
|
+
readonly gain: GainNode;
|
|
6
|
+
readonly worklet: AudioWorkletNode;
|
|
7
|
+
static create({ sampleRate, format, }: FormatConfig): Promise<Output>;
|
|
8
|
+
private constructor();
|
|
9
|
+
close(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function postOverallFeedback(conversationId: string, like: boolean, origin?: string): Promise<Response>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const loadRawAudioProcessor: (worklet: AudioWorklet) => Promise<void>;
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elevenlabs/client",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "ElevenLabs JavaScript Client Library",
|
|
5
|
+
"main": "./dist/lib.umd.js",
|
|
6
|
+
"module": "./dist/lib.module.js",
|
|
7
|
+
"source": "src/index.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"unpkg": "./dist/lib.umd.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/lib.modern.js",
|
|
15
|
+
"require": "./dist/lib.cjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "ElevenLabs",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node-wav": "^0.0.3",
|
|
23
|
+
"@vitest/browser": "^3.0.5",
|
|
24
|
+
"eslint": "^9.8.0",
|
|
25
|
+
"microbundle": "^0.15.1",
|
|
26
|
+
"mock-socket": "^9.3.1",
|
|
27
|
+
"node-wav": "^0.0.2",
|
|
28
|
+
"playwright": "^1.46.1",
|
|
29
|
+
"typescript": "^5.5.4",
|
|
30
|
+
"vitest": "^3.0.5"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/elevenlabs/packages.git",
|
|
35
|
+
"directory": "packages/client"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "BROWSERSLIST_ENV=modern microbundle --jsx React.createElement --jsxFragment React.Fragment --jsxImportSource react src/index.ts",
|
|
39
|
+
"clean": "rm -rf ./dist",
|
|
40
|
+
"dev": "npm run clean && BROWSERSLIST_ENV=development microbundle --jsx React.createElement --jsxFragment React.Fragment --jsxImportSource react src/index.ts -w -f modern",
|
|
41
|
+
"lint": "npm run lint:ts && npm run lint:es && npm run lint:prettier",
|
|
42
|
+
"lint:ts": "tsc --noEmit --skipLibCheck",
|
|
43
|
+
"lint:es": "npx eslint .",
|
|
44
|
+
"lint:prettier": "prettier 'src/**/*.ts' --check",
|
|
45
|
+
"test": "vitest"
|
|
46
|
+
}
|
|
47
|
+
}
|