@rimelabs/sdk 0.1.0-alpha.15 → 0.1.0-alpha.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.0-alpha.16](https://github.com/rimelabs/rime-sdk/compare/typescript-v0.1.0-alpha.15...typescript-v0.1.0-alpha.16) (2026-10-16)
4
+
5
+
6
+ ### Features
7
+
8
+ * **realtime:** expose Prism's speech hint ([#73](https://github.com/rimelabs/rime-sdk/issues/73)) ([cb7187d](https://github.com/rimelabs/rime-sdk/commit/cb7187d687c2210332fee704d43ac9ba45c760ea))
9
+
3
10
  ## [0.1.0-alpha.15](https://github.com/rimelabs/rime-sdk/compare/typescript-v0.1.0-alpha.14...typescript-v0.1.0-alpha.15) (2026-10-13)
4
11
 
5
12
 
@@ -192,6 +192,12 @@ function decodeValue(value, sessionId) {
192
192
  case "prism.typed_input.ready":
193
193
  payload = { kind: "input.ready" };
194
194
  break;
195
+ case "prism.input_audio_buffer.speech_hint":
196
+ payload = {
197
+ kind: "speech.hint",
198
+ audioStartMs: integer(event.audio_start_ms, "audio_start_ms"),
199
+ };
200
+ break;
195
201
  case "input_audio_buffer.speech_started":
196
202
  payload = {
197
203
  kind: "speech.started",
@@ -81,6 +81,13 @@ export declare class RimeRealtimeError extends RimeError {
81
81
  export interface InputReady {
82
82
  readonly kind: "input.ready";
83
83
  }
84
+ /** The user may have started speaking over a playing reply. Prism sends it
85
+ * before `speech.started` when it may interrupt the reply; it can be a false
86
+ * alarm, so lower playback on it rather than stopping. */
87
+ export interface SpeechHint {
88
+ readonly kind: "speech.hint";
89
+ readonly audioStartMs: number;
90
+ }
84
91
  export interface SpeechStarted {
85
92
  readonly kind: "speech.started";
86
93
  readonly itemId: string;
@@ -164,7 +171,7 @@ export interface FaultEvent {
164
171
  readonly kind: "error";
165
172
  readonly error: RealtimeFault;
166
173
  }
167
- export type InputEvent = InputReady | SpeechStarted | SpeechStopped | InputCommitted | TranscriptDelta | TranscriptFinal | TranscriptFailed;
174
+ export type InputEvent = InputReady | SpeechHint | SpeechStarted | SpeechStopped | InputCommitted | TranscriptDelta | TranscriptFinal | TranscriptFailed;
168
175
  export type ResponseEvent = ResponseStarted | ResponseAbandoned | MessageStarted | TextDelta | TextDone | AudioDelta | AudioDone | ToolCall | ResponseEnded;
169
176
  export interface SessionEvent {
170
177
  readonly sessionId: string;
package/docs/realtime.md CHANGED
@@ -130,6 +130,7 @@ are exported from `@rimelabs/sdk`.
130
130
  | Kind | Payload fields |
131
131
  | --- | --- |
132
132
  | `input.ready` | No data fields. Turn methods handle the readiness wait. |
133
+ | `speech.hint` | `audioStartMs`; the user may have started speaking over a playing reply. It can be a false alarm: lower playback, do not stop it. |
133
134
  | `speech.started`, `speech.stopped` | `itemId` and `audioStartMs` or `audioEndMs` |
134
135
  | `input.committed` | `itemId` |
135
136
  | `transcript.delta`, `transcript.final` | `itemId` and `delta` or `text` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimelabs/sdk",
3
- "version": "0.1.0-alpha.15",
3
+ "version": "0.1.0-alpha.16",
4
4
  "description": "Rime streaming TTS, STT and Prism realtime SDK for Node.js",
5
5
  "license": "MIT",
6
6
  "type": "module",