@streamoji/aitwin 0.2.9 → 0.3.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/dist/index.d.ts CHANGED
@@ -19,6 +19,11 @@ export declare type AiTwinHandle = {
19
19
  disconnect: () => Promise<void>;
20
20
  /** Whether a voice WebSocket session is active. */
21
21
  isConnected: () => boolean;
22
+ /**
23
+ * Live MediaStream of the bot/twin voice for recording or mixing.
24
+ * Null until a voice session (or TTS playback) has primed audio.
25
+ */
26
+ getVoiceStream: () => MediaStream | null;
22
27
  };
23
28
 
24
29
  export declare class AiTwinNotFoundError extends Error {
@@ -48,6 +53,8 @@ export declare type AiTwinProps = {
48
53
  * When omitted, a dev token is fetched via getAuthToken.
49
54
  */
50
55
  authToken?: string;
56
+ /** Avatar API base (TTS, session-value, voice). Default: package `DEFAULT_API_BASE`. */
57
+ apiBase?: string;
51
58
  /** TTS engine when using `assets` or `avatarId`/`faceId` (default: Cartesia). */
52
59
  ttsEngineId?: TtsEngineId;
53
60
  /** TTS voice id override (engine-specific). */
@@ -109,6 +116,8 @@ export declare type AvatarTtsLipsyncController = {
109
116
  getStreamMood: () => string;
110
117
  getPlaybackElapsedMs: () => number;
111
118
  isSpeaking: () => boolean;
119
+ /** Live MediaStream of the synthesized voice for recording/mixing (null until audio is primed). */
120
+ getVoiceStream: () => MediaStream | null;
112
121
  setPlaybackSpeed: (rate: number) => void;
113
122
  getPlaybackSpeed: () => number;
114
123
  subscribe: (listener: () => void) => () => void;
@@ -268,7 +277,7 @@ export declare type VoiceConnectOptions = {
268
277
  speakingRate?: number;
269
278
  /** Default true — server streams TTS + avatar messages. */
270
279
  ttsStream?: boolean;
271
- /** HTTP API base; default `https://ai.streamoji.com`. */
280
+ /** HTTP API base; default `https://ai.aitwin.me`. */
272
281
  apiBase?: string;
273
282
  /** Full WebSocket URL override. Query params must be included. */
274
283
  wsUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoji/aitwin",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "description": "Embeddable React AI twin face with TTS lipsync",
5
5
  "type": "module",
6
6
  "main": "./dist/aitwin.cjs",