phonic 0.13.0 → 0.13.2

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
@@ -11,6 +11,7 @@ Node.js library for the Phonic API.
11
11
  - [Get conversation by external id](#get-conversation-by-external-id)
12
12
  - [List conversations](#list-conversations)
13
13
  - [Speech-to-speech via WebSocket](#speech-to-speech-via-websocket)
14
+ - [Messages that Phonic sends back to you](#messages-that-phonic-sends-back-to-you)
14
15
 
15
16
  ## Installation
16
17
 
@@ -75,8 +76,8 @@ if (error === null) {
75
76
 
76
77
  ```ts
77
78
  const { data, error } = await phonic.conversations.list({
78
- durationMin: 10000, // ms
79
- durationMax: 20000, // ms
79
+ durationMin: 10, // sec
80
+ durationMax: 20, // sec
80
81
  startedAtMin: "2025-04-17", // 00:00:00 UTC time is assumed
81
82
  startedAtMax: "2025-09-05T10:30:00.000Z",
82
83
  });
@@ -179,6 +180,52 @@ phonicWebSocket.onError((event) => {
179
180
  });
180
181
  ```
181
182
 
183
+ #### Messages that Phonic sends back to you
184
+
185
+ ##### `input_text`
186
+
187
+ ```ts
188
+ {
189
+ type: "input_text";
190
+ text: string;
191
+ }
192
+ ```
193
+
194
+ Phonic sends this message once user's audio is transcribed.
195
+
196
+ ##### `audio_chunk`
197
+
198
+ ```ts
199
+ {
200
+ type: "audio_chunk";
201
+ audio: string; // base64 encoded array of audio data (each value is in range [-32768..32767] for "pcm_44100" output format, and in range [0..255] for "mulaw_8000" output format)
202
+ text: string; // May potentially be "", but will typically be one word.
203
+ }
204
+ ```
205
+
206
+ These are the assistant response audio chunks.
207
+
208
+ ##### `audio_finished`
209
+
210
+ ```ts
211
+ {
212
+ type: "audio_finished";
213
+ }
214
+ ```
215
+
216
+ Sent after the last "audio_chunk" is sent.
217
+
218
+ ##### `interrupted_response`
219
+
220
+ ```ts
221
+ {
222
+ type: "interrupted_response",
223
+ interruptedResponse: string, // partial assistant response that cuts off approximately where the user interrupted
224
+ }
225
+ ```
226
+
227
+ Sent when the user interrupts the assistant, after the user has finished speaking.
228
+
182
229
  ## License
183
230
 
184
231
  MIT
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ __export(index_exports, {
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // package.json
38
- var version = "0.13.0";
38
+ var version = "0.13.2";
39
39
 
40
40
  // src/conversations/index.ts
41
41
  var Conversations = class {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.13.0";
2
+ var version = "0.13.2";
3
3
 
4
4
  // src/conversations/index.ts
5
5
  var Conversations = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
4
4
  "description": "Phonic Node.js SDK",
5
5
  "scripts": {
6
6
  "build": "tsup",