@absolutejs/voice 0.0.22-beta.496 → 0.0.22-beta.497

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.js CHANGED
@@ -4916,6 +4916,7 @@ var createVoiceSession = (options) => {
4916
4916
  ttsSessionPromise = (async () => {
4917
4917
  const openedSession = await ttsAdapter.open({
4918
4918
  lexicon,
4919
+ prosody: options.prosody,
4919
4920
  sessionId: options.id
4920
4921
  });
4921
4922
  ttsSession = openedSession;
@@ -6884,6 +6884,7 @@ var createVoiceSession = (options) => {
6884
6884
  ttsSessionPromise = (async () => {
6885
6885
  const openedSession = await ttsAdapter.open({
6886
6886
  lexicon,
6887
+ prosody: options.prosody,
6887
6888
  sessionId: options.id
6888
6889
  });
6889
6890
  ttsSession = openedSession;
package/dist/types.d.ts CHANGED
@@ -49,12 +49,18 @@ export type VoiceLexiconEntry = {
49
49
  metadata?: Record<string, unknown>;
50
50
  pronunciation?: string;
51
51
  };
52
+ export type VoiceTranscriptSentiment = {
53
+ label: "negative" | "neutral" | "positive" | (string & {});
54
+ metadata?: Record<string, unknown>;
55
+ score?: number;
56
+ };
52
57
  export type Transcript = {
53
58
  id: string;
54
59
  text: string;
55
60
  isFinal: boolean;
56
61
  confidence?: number;
57
62
  language?: string;
63
+ sentiment?: VoiceTranscriptSentiment;
58
64
  speaker?: string | number;
59
65
  startedAtMs?: number;
60
66
  endedAtMs?: number;
@@ -172,9 +178,16 @@ export type TTSAdapterSession = {
172
178
  export declare const ttsAdapterSessionCanCancel: (session: TTSAdapterSession) => session is TTSAdapterSession & {
173
179
  cancel: (reason?: string) => Promise<void>;
174
180
  };
181
+ export type VoiceTTSProsody = {
182
+ emphasis?: number;
183
+ pitch?: number;
184
+ speed?: number;
185
+ style?: string;
186
+ };
175
187
  export type TTSAdapterOpenOptions = {
176
188
  sessionId: string;
177
189
  lexicon?: VoiceLexiconEntry[];
190
+ prosody?: VoiceTTSProsody;
178
191
  signal?: AbortSignal;
179
192
  };
180
193
  export type TTSAdapter<TOptions extends TTSAdapterOpenOptions = TTSAdapterOpenOptions> = {
@@ -739,6 +752,7 @@ export type CreateVoiceSessionOptions<TContext = unknown, TSession extends Voice
739
752
  semanticTurnDetector?: import("./semanticTurn").VoiceSemanticTurnDetector;
740
753
  assistantMode?: import("./assistantMode").VoiceAssistantMode;
741
754
  modalities?: ReadonlyArray<"audio" | "text">;
755
+ prosody?: VoiceTTSProsody;
742
756
  reconnect: Required<VoiceReconnectConfig>;
743
757
  phraseHints?: VoicePhraseHint[];
744
758
  sessionMetadata?: Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.496",
3
+ "version": "0.0.22-beta.497",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",