@livekit/agents-plugin-cartesia 0.1.3 → 0.1.4
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/index.d.cts +2 -0
- package/dist/models.d.cts +7 -0
- package/dist/tts.d.cts +32 -0
- package/dist/tts.test.d.cts +2 -0
- package/package.json +10 -6
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type TTSModels = 'sonic-english' | 'sonic-multilingual';
|
|
2
|
+
export type TTSLanguages = 'en' | 'es' | 'fr' | 'de' | 'pt' | 'zh' | 'ja';
|
|
3
|
+
export declare const TTSDefaultVoiceId = "c2ac25f9-ecc4-4f56-9095-651354df60c0";
|
|
4
|
+
export type TTSVoiceSpeed = 'fastest' | 'fast' | 'normal' | 'slow' | 'slowest';
|
|
5
|
+
export type TTSVoiceEmotion = 'anger:lowest' | 'anger:low' | 'anger' | 'anger:high' | 'anger:highest' | 'positivity:lowest' | 'positivity:low' | 'positivity' | 'positivity:high' | 'positivity:highest' | 'surprise:lowest' | 'surprise:low' | 'surprise' | 'surprise:high' | 'surprise:highest' | 'sadness:lowest' | 'sadness:low' | 'sadness' | 'sadness:high' | 'sadness:highest' | 'curiosity:lowest' | 'curiosity:low' | 'curiosity' | 'curiosity:high' | 'curiosity:highest';
|
|
6
|
+
export type TTSEncoding = 'pcm_s16le';
|
|
7
|
+
//# sourceMappingURL=models.d.ts.map
|
package/dist/tts.d.cts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { tts } from '@livekit/agents';
|
|
2
|
+
import { type TTSEncoding, type TTSModels, type TTSVoiceEmotion, type TTSVoiceSpeed } from './models.js';
|
|
3
|
+
export interface TTSOptions {
|
|
4
|
+
model: TTSModels | string;
|
|
5
|
+
encoding: TTSEncoding;
|
|
6
|
+
sampleRate: number;
|
|
7
|
+
voice: string | number[];
|
|
8
|
+
speed?: TTSVoiceSpeed | number;
|
|
9
|
+
emotion?: (TTSVoiceEmotion | string)[];
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
language: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class TTS extends tts.TTS {
|
|
14
|
+
#private;
|
|
15
|
+
label: string;
|
|
16
|
+
constructor(opts?: Partial<TTSOptions>);
|
|
17
|
+
updateOptions(opts: Partial<TTSOptions>): void;
|
|
18
|
+
synthesize(text: string): tts.ChunkedStream;
|
|
19
|
+
stream(): SynthesizeStream;
|
|
20
|
+
}
|
|
21
|
+
export declare class ChunkedStream extends tts.ChunkedStream {
|
|
22
|
+
#private;
|
|
23
|
+
label: string;
|
|
24
|
+
constructor(tts: TTS, text: string, opts: TTSOptions);
|
|
25
|
+
}
|
|
26
|
+
export declare class SynthesizeStream extends tts.SynthesizeStream {
|
|
27
|
+
#private;
|
|
28
|
+
label: string;
|
|
29
|
+
constructor(tts: TTS, opts: TTSOptions);
|
|
30
|
+
updateOptions(opts: Partial<TTSOptions>): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=tts.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livekit/agents-plugin-cartesia",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Cartesia plugin for LiveKit Node Agents",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"require": "dist/index.cjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
9
|
+
"import": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"
|
|
12
|
-
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/index.d.cts",
|
|
15
|
+
"default": "./dist/index.cjs"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
18
|
"author": "LiveKit",
|
|
@@ -36,10 +39,11 @@
|
|
|
36
39
|
},
|
|
37
40
|
"peerDependencies": {
|
|
38
41
|
"@livekit/rtc-node": "^0.13.11",
|
|
39
|
-
"@livekit/agents": "^0.7.
|
|
42
|
+
"@livekit/agents": "^0.7.7x"
|
|
40
43
|
},
|
|
41
44
|
"scripts": {
|
|
42
|
-
"build": "tsup --onSuccess \"
|
|
45
|
+
"build": "tsup --onSuccess \"pnpm build:types\"",
|
|
46
|
+
"build:types": "tsc --declaration --emitDeclarationOnly && node ../../scripts/copyDeclarationOutput.js",
|
|
43
47
|
"clean": "rm -rf dist",
|
|
44
48
|
"clean:build": "pnpm clean && pnpm build",
|
|
45
49
|
"lint": "eslint -f unix \"src/**/*.{ts,js}\"",
|