@sathamai/livekit-plugin 0.1.6 → 0.1.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/README.md CHANGED
@@ -15,8 +15,9 @@ npm install @sathamai/livekit-plugin @livekit/agents @livekit/rtc-node
15
15
 
16
16
  ## Use
17
17
 
18
- You pass your satham endpoint and API key (or set `SATHAM_URL` and `SATHAM_API_KEY`); there is no
19
- default server.
18
+ You pass your API key, created in the console at https://console.satham.ai/keys (or set
19
+ `SATHAM_API_KEY`). The endpoint is `https://api.satham.ai`; pass `url` or set `SATHAM_URL` only to use
20
+ another. Calls with satham-1 are enabled on request (https://satham.ai/contact).
20
21
 
21
22
  ```ts
22
23
  import { fileURLToPath } from 'node:url';
@@ -39,7 +40,6 @@ export default defineAgent({
39
40
  const session = new voice.AgentSession({
40
41
  // was: new openai.realtime.RealtimeModel({ voice: ... })
41
42
  llm: new satham.RealtimeModel({
42
- url: process.env.SATHAM_URL,
43
43
  apiKey: process.env.SATHAM_API_KEY,
44
44
  greeting: 'Hello, this is Asha from Example Homes. Is this a good time?',
45
45
  language: 'en',
@@ -86,7 +86,7 @@ cli.runApp(new ServerOptions({ agent: fileURLToPath(import.meta.url) }));
86
86
  | `speed` | `speed` | yes | |
87
87
  | `toolChoice` | `toolChoice` | yes | preview: needs a server with tool support |
88
88
  | `apiKey` | `apiKey` | yes | your satham key |
89
- | `baseURL` | `url` | yes | your satham endpoint |
89
+ | `baseURL` | `url` | yes | optional: `https://api.satham.ai` by default |
90
90
  | Agent instructions | Agent instructions | yes | can change mid-call |
91
91
  | `generateReply()` | `generateReply()` | yes | `response.create`; `instructions` guide that reply alone |
92
92
  | `say()` | `RealtimeSession.say()` | yes | `response.say`, no TTS needed (agents-js: call it on the realtime session) |
@@ -208,7 +208,7 @@ import * as satham from '@sathamai/livekit-plugin';
208
208
  const session = new voice.AgentSession({
209
209
  stt,
210
210
  llm,
211
- // SATHAM_URL and SATHAM_API_KEY, or url and apiKey here
211
+ // SATHAM_API_KEY, or apiKey here (url or SATHAM_URL only for another endpoint)
212
212
  tts: new satham.TTS({ voice: 'malar', language: 'ta', tone: 'professional' }),
213
213
  });
214
214
  ```
@@ -217,7 +217,7 @@ const session = new voice.AgentSession({
217
217
  sentences (its `tts.StreamAdapter`, as for any TTS without streaming input), and the plugin asks for
218
218
  them one at a time. Each comes back streamed as raw PCM and goes out frame by frame as it arrives,
219
219
  so the audio starts as soon as it is made. 24 kHz, mono.
220
- - **Options:** `url`, `apiKey`, `voice` (a named voice such as `naina`, `malar` or `vikram`, or an
220
+ - **Options:** `url`, `apiKey`, `voice` (a named voice such as `saanvi`, `malar` or `vikram`, or an
221
221
  alias such as `hi-female`), `language`, `tone`, `pace`, `instructions`, `breaths`, `naturalPauses`, `pronunciations`, `pronunciationDictionaryId`, `variant` and `model`, as in
222
222
  `@sathamai/sdk`'s `audio.speech` (its README lists the values). `tts.updateOptions({...})` changes
223
223
  them from the next sentence on; set one to `undefined` to clear it. A pause marker in the text
@@ -42,9 +42,9 @@ export declare const REPLY_TIMEOUT_MS = 10000;
42
42
  * decide what the model tells LiveKit it does, so they are fixed for a model once made.
43
43
  */
44
44
  export interface RealtimeModelOptions extends Controls {
45
- /** Your satham endpoint (`wss://...` or `https://...`); `$SATHAM_URL`. */
45
+ /** The satham endpoint: `https://api.satham.ai` unless set here or in `$SATHAM_URL`. */
46
46
  url?: string;
47
- /** Your API key; `$SATHAM_API_KEY`. */
47
+ /** Your API key, from https://console.satham.ai/keys; `$SATHAM_API_KEY`. */
48
48
  apiKey?: string;
49
49
  /** `"auto"`, `"none"`, `"required"` or one function. */
50
50
  toolChoice?: llm.ToolChoice | null;
package/dist/tts.d.ts CHANGED
@@ -47,9 +47,9 @@ export interface TTSVoiceOptions {
47
47
  variant?: SpeechCreateParams['variant'];
48
48
  }
49
49
  export interface TTSOptions extends TTSVoiceOptions {
50
- /** Your satham endpoint (`https://...`); `$SATHAM_URL`. */
50
+ /** The satham endpoint: `https://api.satham.ai` unless set here or in `$SATHAM_URL`. */
51
51
  url?: string;
52
- /** Your API key; `$SATHAM_API_KEY`. */
52
+ /** Your API key, from https://console.satham.ai/keys; `$SATHAM_API_KEY`. */
53
53
  apiKey?: string;
54
54
  }
55
55
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sathamai/livekit-plugin",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "satham realtime speech-to-speech for LiveKit Agents (Node.js)",
5
5
  "keywords": [
6
6
  "satham",
@@ -40,7 +40,7 @@
40
40
  "prepack": "npm run build"
41
41
  },
42
42
  "dependencies": {
43
- "@sathamai/sdk": "^0.1.6"
43
+ "@sathamai/sdk": "^0.1.7"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@livekit/agents": "~1.10.0",