hume 0.15.5 → 0.15.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.
Files changed (85) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/Client.js +4 -1
  3. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.ts +2 -0
  4. package/dist/cjs/api/resources/empathicVoice/resources/chats/client/Client.js +4 -1
  5. package/dist/cjs/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +2 -0
  6. package/dist/cjs/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
  7. package/dist/cjs/api/resources/empathicVoice/types/AssistantInput.d.ts +3 -1
  8. package/dist/cjs/api/resources/empathicVoice/types/AssistantMessage.d.ts +3 -1
  9. package/dist/cjs/api/resources/empathicVoice/types/AssistantProsody.d.ts +1 -1
  10. package/dist/cjs/api/resources/empathicVoice/types/AudioInput.d.ts +4 -6
  11. package/dist/cjs/api/resources/empathicVoice/types/AudioOutput.d.ts +3 -1
  12. package/dist/cjs/api/resources/empathicVoice/types/ChatMetadata.d.ts +3 -1
  13. package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettings.d.ts +4 -2
  14. package/dist/cjs/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.ts +19 -7
  15. package/dist/cjs/api/resources/empathicVoice/types/JsonMessage.d.ts +30 -11
  16. package/dist/cjs/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +3 -1
  17. package/dist/cjs/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +3 -1
  18. package/dist/cjs/api/resources/empathicVoice/types/SessionSettings.d.ts +3 -1
  19. package/dist/cjs/api/resources/empathicVoice/types/SubscribeEvent.d.ts +33 -12
  20. package/dist/cjs/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +3 -1
  21. package/dist/cjs/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -1
  22. package/dist/cjs/api/resources/empathicVoice/types/UserInput.d.ts +2 -6
  23. package/dist/cjs/api/resources/empathicVoice/types/UserInterruption.d.ts +3 -1
  24. package/dist/cjs/api/resources/empathicVoice/types/UserMessage.d.ts +3 -1
  25. package/dist/cjs/api/resources/empathicVoice/types/WebSocketError.d.ts +3 -1
  26. package/dist/cjs/api/resources/tts/client/requests/ConvertVoiceFileRequest.d.ts +1 -1
  27. package/dist/cjs/api/resources/tts/client/requests/ConvertVoiceJsonRequest.d.ts +1 -1
  28. package/dist/cjs/api/resources/tts/resources/voices/client/Client.d.ts +1 -1
  29. package/dist/cjs/api/resources/tts/resources/voices/client/Client.js +11 -8
  30. package/dist/cjs/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +1 -0
  31. package/dist/cjs/serialization/resources/empathicVoice/types/AssistantMessage.d.ts +1 -0
  32. package/dist/cjs/serialization/resources/empathicVoice/types/AssistantMessage.js +1 -0
  33. package/dist/cjs/serialization/resources/empathicVoice/types/ConnectSessionSettings.d.ts +1 -1
  34. package/dist/cjs/serialization/resources/empathicVoice/types/ConnectSessionSettings.js +1 -1
  35. package/dist/cjs/serialization/resources/empathicVoice/types/JsonMessage.d.ts +2 -1
  36. package/dist/cjs/serialization/resources/empathicVoice/types/JsonMessage.js +2 -0
  37. package/dist/cjs/serialization/resources/empathicVoice/types/SubscribeEvent.d.ts +2 -1
  38. package/dist/cjs/serialization/resources/empathicVoice/types/SubscribeEvent.js +2 -0
  39. package/dist/cjs/version.d.ts +1 -1
  40. package/dist/cjs/version.js +1 -1
  41. package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.d.ts +1 -0
  42. package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.js +9 -1
  43. package/dist/esm/Client.mjs +2 -2
  44. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.mjs +4 -1
  45. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.mts +2 -0
  46. package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.mjs +4 -1
  47. package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.mts +2 -0
  48. package/dist/esm/api/resources/empathicVoice/types/AssistantEnd.d.mts +1 -1
  49. package/dist/esm/api/resources/empathicVoice/types/AssistantInput.d.mts +3 -1
  50. package/dist/esm/api/resources/empathicVoice/types/AssistantMessage.d.mts +3 -1
  51. package/dist/esm/api/resources/empathicVoice/types/AssistantProsody.d.mts +1 -1
  52. package/dist/esm/api/resources/empathicVoice/types/AudioInput.d.mts +4 -6
  53. package/dist/esm/api/resources/empathicVoice/types/AudioOutput.d.mts +3 -1
  54. package/dist/esm/api/resources/empathicVoice/types/ChatMetadata.d.mts +3 -1
  55. package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettings.d.mts +4 -2
  56. package/dist/esm/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.mts +19 -7
  57. package/dist/esm/api/resources/empathicVoice/types/JsonMessage.d.mts +30 -11
  58. package/dist/esm/api/resources/empathicVoice/types/PauseAssistantMessage.d.mts +3 -1
  59. package/dist/esm/api/resources/empathicVoice/types/ResumeAssistantMessage.d.mts +3 -1
  60. package/dist/esm/api/resources/empathicVoice/types/SessionSettings.d.mts +3 -1
  61. package/dist/esm/api/resources/empathicVoice/types/SubscribeEvent.d.mts +33 -12
  62. package/dist/esm/api/resources/empathicVoice/types/ToolErrorMessage.d.mts +3 -1
  63. package/dist/esm/api/resources/empathicVoice/types/ToolResponseMessage.d.mts +3 -1
  64. package/dist/esm/api/resources/empathicVoice/types/UserInput.d.mts +2 -6
  65. package/dist/esm/api/resources/empathicVoice/types/UserInterruption.d.mts +3 -1
  66. package/dist/esm/api/resources/empathicVoice/types/UserMessage.d.mts +3 -1
  67. package/dist/esm/api/resources/empathicVoice/types/WebSocketError.d.mts +3 -1
  68. package/dist/esm/api/resources/tts/client/requests/ConvertVoiceFileRequest.d.mts +1 -1
  69. package/dist/esm/api/resources/tts/client/requests/ConvertVoiceJsonRequest.d.mts +1 -1
  70. package/dist/esm/api/resources/tts/resources/voices/client/Client.d.mts +1 -1
  71. package/dist/esm/api/resources/tts/resources/voices/client/Client.mjs +11 -8
  72. package/dist/esm/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.mts +1 -0
  73. package/dist/esm/serialization/resources/empathicVoice/types/AssistantMessage.d.mts +1 -0
  74. package/dist/esm/serialization/resources/empathicVoice/types/AssistantMessage.mjs +1 -0
  75. package/dist/esm/serialization/resources/empathicVoice/types/ConnectSessionSettings.d.mts +1 -1
  76. package/dist/esm/serialization/resources/empathicVoice/types/ConnectSessionSettings.mjs +1 -1
  77. package/dist/esm/serialization/resources/empathicVoice/types/JsonMessage.d.mts +2 -1
  78. package/dist/esm/serialization/resources/empathicVoice/types/JsonMessage.mjs +2 -0
  79. package/dist/esm/serialization/resources/empathicVoice/types/SubscribeEvent.d.mts +2 -1
  80. package/dist/esm/serialization/resources/empathicVoice/types/SubscribeEvent.mjs +2 -0
  81. package/dist/esm/version.d.mts +1 -1
  82. package/dist/esm/version.mjs +1 -1
  83. package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.d.mts +1 -0
  84. package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.mjs +9 -1
  85. package/package.json +1 -1
@@ -45,8 +45,8 @@ class HumeClient {
45
45
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
46
46
  "X-Fern-Language": "JavaScript",
47
47
  "X-Fern-SDK-Name": "hume",
48
- "X-Fern-SDK-Version": "0.15.5",
49
- "User-Agent": "hume/0.15.5",
48
+ "X-Fern-SDK-Version": "0.15.7",
49
+ "User-Agent": "hume/0.15.7",
50
50
  "X-Fern-Runtime": core.RUNTIME.type,
51
51
  "X-Fern-Runtime-Version": core.RUNTIME.version,
52
52
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -183,8 +183,11 @@ class ChatGroups {
183
183
  __getChatGroup(id_1) {
184
184
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
185
185
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
186
- const { pageSize, pageNumber, ascendingOrder } = request;
186
+ const { status, pageSize, pageNumber, ascendingOrder } = request;
187
187
  const _queryParams = {};
188
+ if (status != null) {
189
+ _queryParams.status = status;
190
+ }
188
191
  if (pageSize != null) {
189
192
  _queryParams.page_size = pageSize.toString();
190
193
  }
@@ -7,6 +7,8 @@
7
7
  * }
8
8
  */
9
9
  export interface ChatGroupsGetChatGroupRequest {
10
+ /** Chat status to apply to the chat. String from the ChatStatus enum. */
11
+ status?: string;
10
12
  /**
11
13
  * Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive.
12
14
  *
@@ -73,7 +73,7 @@ class Chats {
73
73
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
74
74
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
75
75
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
76
- const { pageNumber, pageSize, ascendingOrder, configId } = request;
76
+ const { pageNumber, pageSize, ascendingOrder, configId, status } = request;
77
77
  const _queryParams = {};
78
78
  if (pageNumber != null) {
79
79
  _queryParams.page_number = pageNumber.toString();
@@ -87,6 +87,9 @@ class Chats {
87
87
  if (configId != null) {
88
88
  _queryParams.config_id = configId;
89
89
  }
90
+ if (status != null) {
91
+ _queryParams.status = status;
92
+ }
90
93
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
94
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
92
95
  url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
@@ -23,4 +23,6 @@ export interface ChatsListChatsRequest {
23
23
  ascendingOrder?: boolean;
24
24
  /** Filter to only include chats that used this config. */
25
25
  configId?: string;
26
+ /** Chat status to apply to the chat. String from the ChatStatus enum. */
27
+ status?: string;
26
28
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * When provided, the output is an assistant end message.
2
+ * **Indicates the conclusion of the assistant's response**, signaling that the assistant has finished speaking for the current conversational turn.
3
3
  */
4
4
  export interface AssistantEnd {
5
5
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,5 +1,7 @@
1
1
  /**
2
- * When provided, the input is spoken by EVI.
2
+ * **Assistant text to synthesize into spoken audio and insert into the conversation.** EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model.
3
+ *
4
+ * Our model adds appropriate emotional inflections and tones to the text based on the user's expressions and the context of the conversation. The synthesized audio is streamed back to the user as an Assistant Message.
3
5
  */
4
6
  export interface AssistantInput {
5
7
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,6 +1,6 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  /**
3
- * When provided, the output is an assistant message.
3
+ * **Transcript of the assistant's message.** Contains the message role, content, and optionally tool call information including the tool name, parameters, response requirement status, tool call ID, and tool type.
4
4
  */
5
5
  export interface AssistantMessage {
6
6
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -9,6 +9,8 @@ export interface AssistantMessage {
9
9
  fromText: boolean;
10
10
  /** ID of the assistant message. Allows the Assistant Message to be tracked and referenced. */
11
11
  id?: string;
12
+ /** Indicates if this message is a quick response or not. */
13
+ isQuickResponse: boolean;
12
14
  /** Detected language of the message text. */
13
15
  language?: string;
14
16
  /** Transcript of the message. */
@@ -1,6 +1,6 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  /**
3
- * When provided, the output is an Assistant Prosody message.
3
+ * **Expression measurement predictions of the assistant's audio output.** Contains inference model results including prosody scores for 48 emotions within the detected expression of the assistant's audio sample.
4
4
  */
5
5
  export interface AssistantProsody {
6
6
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,5 +1,7 @@
1
1
  /**
2
- * When provided, the input is audio.
2
+ * **Base64 encoded audio input to insert into the conversation.** The content is treated as the user's speech to EVI and must be streamed continuously. Pre-recorded audio files are not supported.
3
+ *
4
+ * For optimal transcription quality, the audio data should be transmitted in small chunks. Hume recommends streaming audio with a buffer window of `20` milliseconds (ms), or `100` milliseconds (ms) for web applications. See our [Audio Guide](/docs/speech-to-speech-evi/guides/audio) for more details on preparing and processing audio.
3
5
  */
4
6
  export interface AudioInput {
5
7
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -14,10 +16,6 @@ export interface AudioInput {
14
16
  * Hume recommends streaming audio with a buffer window of 20 milliseconds (ms), or 100 milliseconds (ms) for web applications.
15
17
  */
16
18
  data: string;
17
- /**
18
- * The type of message sent through the socket; must be `audio_input` for our server to correctly identify and process it as an Audio Input message.
19
- *
20
- * This message is used for sending audio input data to EVI for processing and expression measurement. Audio data should be sent as a continuous stream, encoded in Base64.
21
- */
19
+ /** The type of message sent through the socket; must be `audio_input` for our server to correctly identify and process it as an Audio Input message. */
22
20
  type: "audio_input";
23
21
  }
@@ -1,5 +1,7 @@
1
1
  /**
2
- * The type of message sent through the socket; for an Audio Output message, this must be `audio_output`.
2
+ * **Base64 encoded audio output.** This encoded audio is transmitted to the client, where it can be decoded and played back as part of the user interaction. The returned audio format is WAV and the sample rate is 48kHz.
3
+ *
4
+ * Contains the audio data, an ID to track and reference the audio output, and an index indicating the chunk position relative to the whole audio segment. See our [Audio Guide](/docs/speech-to-speech-evi/guides/audio) for more details on preparing and processing audio.
3
5
  */
4
6
  export interface AudioOutput {
5
7
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,5 +1,7 @@
1
1
  /**
2
- * When provided, the output is a chat metadata message.
2
+ * **The first message received after establishing a connection with EVI**, containing important identifiers for the current Chat session.
3
+ *
4
+ * Includes the Chat ID (which allows the Chat session to be tracked and referenced) and the Chat Group ID (used to resume a Chat when passed in the `resumed_chat_group_id` query parameter of a subsequent connection request, allowing EVI to continue the conversation from where it left off within the Chat Group).
3
5
  */
4
6
  export interface ChatMetadata {
5
7
  /**
@@ -34,14 +34,16 @@ export interface ConnectSessionSettings {
34
34
  * For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting).
35
35
  */
36
36
  systemPrompt?: string;
37
+ /** The name or ID of the voice from the `Voice Library` to be used as the speaker for this EVI session. This will override the speaker set in the selected configuration. */
38
+ voiceId?: string;
37
39
  /**
38
40
  * This field allows you to assign values to dynamic variables referenced in your system prompt.
39
41
  *
40
42
  * Each key represents the variable name, and the corresponding value is the specific content you wish to assign to that variable within the session. While the values for variables can be strings, numbers, or booleans, the value will ultimately be converted to a string when injected into your system prompt.
41
43
  *
44
+ * When used in query parameters, specify each variable using bracket notation: `session_settings[variables][key]=value`. For example: `session_settings[variables][name]=John&session_settings[variables][age]=30`.
45
+ *
42
46
  * Using this field, you can personalize responses based on session-specific details. For more guidance, see our [guide on using dynamic variables](/docs/speech-to-speech-evi/features/dynamic-variables).
43
47
  */
44
48
  variables?: Record<string, Hume.empathicVoice.ConnectSessionSettingsVariablesValue>;
45
- /** The name or ID of the voice from the `Voice Library` to be used as the speaker for this EVI session. This will override the speaker set in the selected configuration. */
46
- voiceId?: string;
47
49
  }
@@ -1,25 +1,37 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  export type ControlPlanePublishEvent =
3
3
  /**
4
- * Settings for this chat session. */
4
+ * **Settings for this chat session.** Session settings are temporary and apply only to the current Chat session.
5
+ *
6
+ * These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience. See our [Session Settings Guide](/docs/speech-to-speech-evi/configuration/session-settings) for a complete list of configurable settings. */
5
7
  Hume.empathicVoice.SessionSettings
6
8
  /**
7
- * User text to insert into the conversation. Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response.
9
+ * **User text to insert into the conversation.** Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response.
8
10
  *
9
11
  * Expression measurement results are not available for User Input messages, as the prosody model relies on audio input and cannot process text alone. */
10
12
  | Hume.empathicVoice.UserInput
11
13
  /**
12
- * When provided, the input is spoken by EVI. */
14
+ * **Assistant text to synthesize into spoken audio and insert into the conversation.** EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model.
15
+ *
16
+ * Our model adds appropriate emotional inflections and tones to the text based on the user's expressions and the context of the conversation. The synthesized audio is streamed back to the user as an Assistant Message. */
13
17
  | Hume.empathicVoice.AssistantInput
14
18
  /**
15
- * When provided, the output is a function call response. */
19
+ * **Return value of the tool call.** Contains the output generated by the tool to pass back to EVI. Upon receiving a Tool Call message and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
20
+ *
21
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage`. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
16
22
  | Hume.empathicVoice.ToolResponseMessage
17
23
  /**
18
- * When provided, the output is a function call error. */
24
+ * **Error message from the tool call**, not exposed to the LLM or user. Upon receiving a Tool Call message and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
25
+ *
26
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage` if the tool fails. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
19
27
  | Hume.empathicVoice.ToolErrorMessage
20
28
  /**
21
- * Pause responses from EVI. Chat history is still saved and sent after resuming. */
29
+ * **Pause responses from EVI.** Chat history is still saved and sent after resuming. Once this message is sent, EVI will not respond until a Resume Assistant message is sent.
30
+ *
31
+ * When paused, EVI won't respond, but transcriptions of your audio inputs will still be recorded. See our [Pause Response Guide](/docs/speech-to-speech-evi/features/pause-responses) for further details. */
22
32
  | Hume.empathicVoice.PauseAssistantMessage
23
33
  /**
24
- * Resume responses from EVI. Chat history sent while paused will now be sent. */
34
+ * **Resume responses from EVI.** Chat history sent while paused will now be sent.
35
+ *
36
+ * Upon resuming, if any audio input was sent during the pause, EVI will retain context from all messages sent but only respond to the last user message. See our [Pause Response Guide](/docs/speech-to-speech-evi/features/pause-responses) for further details. */
25
37
  | Hume.empathicVoice.ResumeAssistantMessage;
@@ -1,32 +1,51 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  export type JsonMessage =
3
3
  /**
4
- * When provided, the output is an assistant end message. */
4
+ * **Indicates the conclusion of the assistant's response**, signaling that the assistant has finished speaking for the current conversational turn. */
5
5
  Hume.empathicVoice.AssistantEnd
6
6
  /**
7
- * When provided, the output is an assistant message. */
7
+ * **Transcript of the assistant's message.** Contains the message role, content, and optionally tool call information including the tool name, parameters, response requirement status, tool call ID, and tool type. */
8
8
  | Hume.empathicVoice.AssistantMessage
9
9
  /**
10
- * When provided, the output is an Assistant Prosody message. */
10
+ * **Expression measurement predictions of the assistant's audio output.** Contains inference model results including prosody scores for 48 emotions within the detected expression of the assistant's audio sample. */
11
11
  | Hume.empathicVoice.AssistantProsody
12
12
  /**
13
- * When provided, the output is a chat metadata message. */
13
+ * **The first message received after establishing a connection with EVI**, containing important identifiers for the current Chat session.
14
+ *
15
+ * Includes the Chat ID (which allows the Chat session to be tracked and referenced) and the Chat Group ID (used to resume a Chat when passed in the `resumed_chat_group_id` query parameter of a subsequent connection request, allowing EVI to continue the conversation from where it left off within the Chat Group). */
14
16
  | Hume.empathicVoice.ChatMetadata
15
17
  /**
16
- * When provided, the output is an error message. */
18
+ * **Indicates a disruption in the WebSocket connection**, such as an unexpected disconnection, protocol error, or data transmission issue.
19
+ *
20
+ * Contains an error code identifying the type of error encountered, a detailed description of the error, and a short, human-readable identifier and description (slug) for the error. */
17
21
  | Hume.empathicVoice.WebSocketError
18
22
  /**
19
- * When provided, the output is an interruption. */
23
+ * **Indicates the user has interrupted the assistant's response.** EVI detects the interruption in real-time and sends this message to signal the interruption event.
24
+ *
25
+ * This message allows the system to stop the current audio playback, clear the audio queue, and prepare to handle new user input. Contains a Unix timestamp of when the user interruption was detected. For more details, see our [Interruptibility Guide](/docs/speech-to-speech-evi/features/interruptibility) */
20
26
  | Hume.empathicVoice.UserInterruption
21
27
  /**
22
- * When provided, the output is a user message. */
28
+ * **Transcript of the user's message.** Contains the message role and content, along with a `from_text` field indicating if this message was inserted into the conversation as text from a `UserInput` message.
29
+ *
30
+ * Includes an `interim` field indicating whether the transcript is provisional (words may be repeated or refined in subsequent `UserMessage` responses as additional audio is processed) or final and complete. Interim transcripts are only sent when the `verbose_transcription` query parameter is set to true in the initial handshake. */
23
31
  | Hume.empathicVoice.UserMessage
24
32
  /**
25
- * When provided, the output is a tool call. */
33
+ * **Indicates that the supplemental LLM has detected a need to invoke the specified tool.** This message is only received for user-defined function tools.
34
+ *
35
+ * Contains the tool name, parameters (as a stringified JSON schema), whether a response is required from the developer (either in the form of a `ToolResponseMessage` or a `ToolErrorMessage`), the unique tool call ID for tracking the request and response, and the tool type. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
26
36
  | Hume.empathicVoice.ToolCallMessage
27
37
  /**
28
- * When provided, the output is a function call response. */
38
+ * **Return value of the tool call.** Contains the output generated by the tool to pass back to EVI. Upon receiving a Tool Call message and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
39
+ *
40
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage`. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
29
41
  | Hume.empathicVoice.ToolResponseMessage
30
42
  /**
31
- * When provided, the output is a function call error. */
32
- | Hume.empathicVoice.ToolErrorMessage;
43
+ * **Error message from the tool call**, not exposed to the LLM or user. Upon receiving a Tool Call message and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
44
+ *
45
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage` if the tool fails. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
46
+ | Hume.empathicVoice.ToolErrorMessage
47
+ /**
48
+ * **Settings for this chat session.** Session settings are temporary and apply only to the current Chat session.
49
+ *
50
+ * These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience. See our [Session Settings Guide](/docs/speech-to-speech-evi/configuration/session-settings) for a complete list of configurable settings. */
51
+ | Hume.empathicVoice.SessionSettings;
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Pause responses from EVI. Chat history is still saved and sent after resuming.
2
+ * **Pause responses from EVI.** Chat history is still saved and sent after resuming. Once this message is sent, EVI will not respond until a Resume Assistant message is sent.
3
+ *
4
+ * When paused, EVI won't respond, but transcriptions of your audio inputs will still be recorded. See our [Pause Response Guide](/docs/speech-to-speech-evi/features/pause-responses) for further details.
3
5
  */
4
6
  export interface PauseAssistantMessage {
5
7
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Resume responses from EVI. Chat history sent while paused will now be sent.
2
+ * **Resume responses from EVI.** Chat history sent while paused will now be sent.
3
+ *
4
+ * Upon resuming, if any audio input was sent during the pause, EVI will retain context from all messages sent but only respond to the last user message. See our [Pause Response Guide](/docs/speech-to-speech-evi/features/pause-responses) for further details.
3
5
  */
4
6
  export interface ResumeAssistantMessage {
5
7
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,6 +1,8 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  /**
3
- * Settings for this chat session.
3
+ * **Settings for this chat session.** Session settings are temporary and apply only to the current Chat session.
4
+ *
5
+ * These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience. See our [Session Settings Guide](/docs/speech-to-speech-evi/configuration/session-settings) for a complete list of configurable settings.
4
6
  */
5
7
  export interface SessionSettings {
6
8
  /**
@@ -1,35 +1,56 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  export type SubscribeEvent =
3
3
  /**
4
- * When provided, the output is an assistant end message. */
4
+ * **Indicates the conclusion of the assistant's response**, signaling that the assistant has finished speaking for the current conversational turn. */
5
5
  Hume.empathicVoice.AssistantEnd
6
6
  /**
7
- * When provided, the output is an assistant message. */
7
+ * **Transcript of the assistant's message.** Contains the message role, content, and optionally tool call information including the tool name, parameters, response requirement status, tool call ID, and tool type. */
8
8
  | Hume.empathicVoice.AssistantMessage
9
9
  /**
10
- * When provided, the output is an Assistant Prosody message. */
10
+ * **Expression measurement predictions of the assistant's audio output.** Contains inference model results including prosody scores for 48 emotions within the detected expression of the assistant's audio sample. */
11
11
  | Hume.empathicVoice.AssistantProsody
12
12
  /**
13
- * The type of message sent through the socket; for an Audio Output message, this must be `audio_output`. */
13
+ * **Base64 encoded audio output.** This encoded audio is transmitted to the client, where it can be decoded and played back as part of the user interaction. The returned audio format is WAV and the sample rate is 48kHz.
14
+ *
15
+ * Contains the audio data, an ID to track and reference the audio output, and an index indicating the chunk position relative to the whole audio segment. See our [Audio Guide](/docs/speech-to-speech-evi/guides/audio) for more details on preparing and processing audio. */
14
16
  | Hume.empathicVoice.AudioOutput
15
17
  /**
16
- * When provided, the output is a chat metadata message. */
18
+ * **The first message received after establishing a connection with EVI**, containing important identifiers for the current Chat session.
19
+ *
20
+ * Includes the Chat ID (which allows the Chat session to be tracked and referenced) and the Chat Group ID (used to resume a Chat when passed in the `resumed_chat_group_id` query parameter of a subsequent connection request, allowing EVI to continue the conversation from where it left off within the Chat Group). */
17
21
  | Hume.empathicVoice.ChatMetadata
18
22
  /**
19
- * When provided, the output is an error message. */
23
+ * **Indicates a disruption in the WebSocket connection**, such as an unexpected disconnection, protocol error, or data transmission issue.
24
+ *
25
+ * Contains an error code identifying the type of error encountered, a detailed description of the error, and a short, human-readable identifier and description (slug) for the error. */
20
26
  | Hume.empathicVoice.WebSocketError
21
27
  /**
22
- * When provided, the output is an interruption. */
28
+ * **Indicates the user has interrupted the assistant's response.** EVI detects the interruption in real-time and sends this message to signal the interruption event.
29
+ *
30
+ * This message allows the system to stop the current audio playback, clear the audio queue, and prepare to handle new user input. Contains a Unix timestamp of when the user interruption was detected. For more details, see our [Interruptibility Guide](/docs/speech-to-speech-evi/features/interruptibility) */
23
31
  | Hume.empathicVoice.UserInterruption
24
32
  /**
25
- * When provided, the output is a user message. */
33
+ * **Transcript of the user's message.** Contains the message role and content, along with a `from_text` field indicating if this message was inserted into the conversation as text from a `UserInput` message.
34
+ *
35
+ * Includes an `interim` field indicating whether the transcript is provisional (words may be repeated or refined in subsequent `UserMessage` responses as additional audio is processed) or final and complete. Interim transcripts are only sent when the `verbose_transcription` query parameter is set to true in the initial handshake. */
26
36
  | Hume.empathicVoice.UserMessage
27
37
  /**
28
- * When provided, the output is a tool call. */
38
+ * **Indicates that the supplemental LLM has detected a need to invoke the specified tool.** This message is only received for user-defined function tools.
39
+ *
40
+ * Contains the tool name, parameters (as a stringified JSON schema), whether a response is required from the developer (either in the form of a `ToolResponseMessage` or a `ToolErrorMessage`), the unique tool call ID for tracking the request and response, and the tool type. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
29
41
  | Hume.empathicVoice.ToolCallMessage
30
42
  /**
31
- * When provided, the output is a function call response. */
43
+ * **Return value of the tool call.** Contains the output generated by the tool to pass back to EVI. Upon receiving a Tool Call message and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
44
+ *
45
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage`. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
32
46
  | Hume.empathicVoice.ToolResponseMessage
33
47
  /**
34
- * When provided, the output is a function call error. */
35
- | Hume.empathicVoice.ToolErrorMessage;
48
+ * **Error message from the tool call**, not exposed to the LLM or user. Upon receiving a Tool Call message and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
49
+ *
50
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage` if the tool fails. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details. */
51
+ | Hume.empathicVoice.ToolErrorMessage
52
+ /**
53
+ * **Settings for this chat session.** Session settings are temporary and apply only to the current Chat session.
54
+ *
55
+ * These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience. See our [Session Settings Guide](/docs/speech-to-speech-evi/configuration/session-settings) for a complete list of configurable settings. */
56
+ | Hume.empathicVoice.SessionSettings;
@@ -1,6 +1,8 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  /**
3
- * When provided, the output is a function call error.
3
+ * **Error message from the tool call**, not exposed to the LLM or user. Upon receiving a Tool Call message and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
4
+ *
5
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage` if the tool fails. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details.
4
6
  */
5
7
  export interface ToolErrorMessage {
6
8
  /** Error code. Identifies the type of error encountered. */
@@ -1,6 +1,8 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  /**
3
- * When provided, the output is a function call response.
3
+ * **Return value of the tool call.** Contains the output generated by the tool to pass back to EVI. Upon receiving a Tool Call message and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
4
+ *
5
+ * For built-in tools implemented on the server, you will receive this message type rather than a `ToolCallMessage`. See our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use) for further details.
4
6
  */
5
7
  export interface ToolResponseMessage {
6
8
  /** Return value of the tool call. Contains the output generated by the tool to pass back to EVI. */
@@ -1,16 +1,12 @@
1
1
  /**
2
- * User text to insert into the conversation. Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response.
2
+ * **User text to insert into the conversation.** Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response.
3
3
  *
4
4
  * Expression measurement results are not available for User Input messages, as the prosody model relies on audio input and cannot process text alone.
5
5
  */
6
6
  export interface UserInput {
7
7
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
8
8
  customSessionId?: string;
9
- /**
10
- * User text to insert into the conversation. Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response.
11
- *
12
- * Expression measurement results are not available for User Input messages, as the prosody model relies on audio input and cannot process text alone.
13
- */
9
+ /** User text to insert into the conversation. Text sent through a User Input message is treated as the user's speech to EVI. EVI processes this input and provides a corresponding response. */
14
10
  text: string;
15
11
  /** The type of message sent through the socket; must be `user_input` for our server to correctly identify and process it as a User Input message. */
16
12
  type: "user_input";
@@ -1,5 +1,7 @@
1
1
  /**
2
- * When provided, the output is an interruption.
2
+ * **Indicates the user has interrupted the assistant's response.** EVI detects the interruption in real-time and sends this message to signal the interruption event.
3
+ *
4
+ * This message allows the system to stop the current audio playback, clear the audio queue, and prepare to handle new user input. Contains a Unix timestamp of when the user interruption was detected. For more details, see our [Interruptibility Guide](/docs/speech-to-speech-evi/features/interruptibility)
3
5
  */
4
6
  export interface UserInterruption {
5
7
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,6 +1,8 @@
1
1
  import type * as Hume from "../../../index.js";
2
2
  /**
3
- * When provided, the output is a user message.
3
+ * **Transcript of the user's message.** Contains the message role and content, along with a `from_text` field indicating if this message was inserted into the conversation as text from a `UserInput` message.
4
+ *
5
+ * Includes an `interim` field indicating whether the transcript is provisional (words may be repeated or refined in subsequent `UserMessage` responses as additional audio is processed) or final and complete. Interim transcripts are only sent when the `verbose_transcription` query parameter is set to true in the initial handshake.
4
6
  */
5
7
  export interface UserMessage {
6
8
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -1,5 +1,7 @@
1
1
  /**
2
- * When provided, the output is an error message.
2
+ * **Indicates a disruption in the WebSocket connection**, such as an unexpected disconnection, protocol error, or data transmission issue.
3
+ *
4
+ * Contains an error code identifying the type of error encountered, a detailed description of the error, and a short, human-readable identifier and description (slug) for the error.
3
5
  */
4
6
  export interface WebSocketError {
5
7
  /** Error code. Identifies the type of error encountered. */
@@ -9,6 +9,6 @@ export interface ConvertVoiceFileRequest {
9
9
  voice?: Hume.tts.PostedUtteranceVoice;
10
10
  /** Specifies the output audio file format. */
11
11
  format?: Hume.tts.Format;
12
- /** The set of timestamp types to include in the response. */
12
+ /** The set of timestamp types to include in the response. When used in multipart/form-data, specify each value using bracket notation: `include_timestamp_types[0]=word&include_timestamp_types[1]=phoneme`. Only supported for Octave 2 requests. */
13
13
  includeTimestampTypes?: Hume.tts.TimestampType[];
14
14
  }
@@ -13,6 +13,6 @@ export interface ConvertVoiceJsonRequest {
13
13
  voice?: Hume.tts.PostedUtteranceVoice;
14
14
  /** Specifies the output audio file format. */
15
15
  format?: Hume.tts.Format;
16
- /** The set of timestamp types to include in the response. */
16
+ /** The set of timestamp types to include in the response. When used in multipart/form-data, specify each value using bracket notation: `include_timestamp_types[0]=word&include_timestamp_types[1]=phoneme`. Only supported for Octave 2 requests. */
17
17
  includeTimestampTypes?: Hume.tts.TimestampType[];
18
18
  }
@@ -57,5 +57,5 @@ export declare class Voices {
57
57
  */
58
58
  delete(request: Hume.tts.VoicesDeleteRequest, requestOptions?: Voices.RequestOptions): core.HttpResponsePromise<void>;
59
59
  private __delete;
60
- protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | null | undefined>>;
60
+ protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
61
61
  }
@@ -71,7 +71,7 @@ class Voices {
71
71
  return __awaiter(this, void 0, void 0, function* () {
72
72
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
73
73
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
74
- const { provider, pageNumber, pageSize, ascendingOrder } = request;
74
+ const { provider, pageNumber, pageSize, ascendingOrder, filterTag } = request;
75
75
  const _queryParams = {};
76
76
  _queryParams.provider = serializers.tts.VoiceProvider.jsonOrThrow(provider, {
77
77
  unrecognizedObjectKeys: "strip",
@@ -86,6 +86,14 @@ class Voices {
86
86
  if (ascendingOrder != null) {
87
87
  _queryParams.ascending_order = ascendingOrder.toString();
88
88
  }
89
+ if (filterTag != null) {
90
+ if (Array.isArray(filterTag)) {
91
+ _queryParams.filter_tag = filterTag.map((item) => item);
92
+ }
93
+ else {
94
+ _queryParams.filter_tag = filterTag;
95
+ }
96
+ }
89
97
  const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
90
98
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
91
99
  url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
@@ -320,13 +328,8 @@ class Voices {
320
328
  }
321
329
  _getCustomAuthorizationHeaders() {
322
330
  return __awaiter(this, void 0, void 0, function* () {
323
- var _a;
324
- const apiKeyValue = core.Supplier.get(this._options.apiKey);
325
- // This `authHeaderValue` is manually added as if you don't provide it it will
326
- // be omitted from the headers which means it won't reach the logic in ws.ts that
327
- // extracts values from the headers and adds them to query parameters.
328
- const authHeaderValue = core.Supplier.get((_a = this._options.headers) === null || _a === void 0 ? void 0 : _a.authorization);
329
- return { "X-Hume-Api-Key": apiKeyValue, Authorization: authHeaderValue };
331
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
332
+ return { "X-Hume-Api-Key": apiKeyValue };
330
333
  });
331
334
  }
332
335
  }
@@ -26,4 +26,5 @@ export interface VoicesListRequest {
26
26
  */
27
27
  pageSize?: number;
28
28
  ascendingOrder?: boolean;
29
+ filterTag?: string | string[];
29
30
  }
@@ -9,6 +9,7 @@ export declare namespace AssistantMessage {
9
9
  custom_session_id?: string | null;
10
10
  from_text: boolean;
11
11
  id?: string | null;
12
+ is_quick_response: boolean;
12
13
  language?: string | null;
13
14
  message: ChatMessage.Raw;
14
15
  models: Inference.Raw;
@@ -42,6 +42,7 @@ exports.AssistantMessage = core.serialization.object({
42
42
  customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
43
43
  fromText: core.serialization.property("from_text", core.serialization.boolean()),
44
44
  id: core.serialization.string().optional(),
45
+ isQuickResponse: core.serialization.property("is_quick_response", core.serialization.boolean()),
45
46
  language: core.serialization.string().optional(),
46
47
  message: ChatMessage_js_1.ChatMessage,
47
48
  models: Inference_js_1.Inference,
@@ -13,7 +13,7 @@ export declare namespace ConnectSessionSettings {
13
13
  event_limit?: number | null;
14
14
  language_model_api_key?: string | null;
15
15
  system_prompt?: string | null;
16
- variables?: Record<string, ConnectSessionSettingsVariablesValue.Raw> | null;
17
16
  voice_id?: string | null;
17
+ variables?: Record<string, ConnectSessionSettingsVariablesValue.Raw> | null;
18
18
  }
19
19
  }
@@ -46,6 +46,6 @@ exports.ConnectSessionSettings = core.serialization.object({
46
46
  eventLimit: core.serialization.property("event_limit", core.serialization.number().optional()),
47
47
  languageModelApiKey: core.serialization.property("language_model_api_key", core.serialization.string().optional()),
48
48
  systemPrompt: core.serialization.property("system_prompt", core.serialization.string().optional()),
49
- variables: core.serialization.record(core.serialization.string(), ConnectSessionSettingsVariablesValue_js_1.ConnectSessionSettingsVariablesValue).optional(),
50
49
  voiceId: core.serialization.property("voice_id", core.serialization.string().optional()),
50
+ variables: core.serialization.record(core.serialization.string(), ConnectSessionSettingsVariablesValue_js_1.ConnectSessionSettingsVariablesValue).optional(),
51
51
  });
@@ -5,6 +5,7 @@ import { AssistantEnd } from "./AssistantEnd.js";
5
5
  import { AssistantMessage } from "./AssistantMessage.js";
6
6
  import { AssistantProsody } from "./AssistantProsody.js";
7
7
  import { ChatMetadata } from "./ChatMetadata.js";
8
+ import { SessionSettings } from "./SessionSettings.js";
8
9
  import { ToolCallMessage } from "./ToolCallMessage.js";
9
10
  import { ToolErrorMessage } from "./ToolErrorMessage.js";
10
11
  import { ToolResponseMessage } from "./ToolResponseMessage.js";
@@ -13,5 +14,5 @@ import { UserMessage } from "./UserMessage.js";
13
14
  import { WebSocketError } from "./WebSocketError.js";
14
15
  export declare const JsonMessage: core.serialization.Schema<serializers.empathicVoice.JsonMessage.Raw, Hume.empathicVoice.JsonMessage>;
15
16
  export declare namespace JsonMessage {
16
- type Raw = AssistantEnd.Raw | AssistantMessage.Raw | AssistantProsody.Raw | ChatMetadata.Raw | WebSocketError.Raw | UserInterruption.Raw | UserMessage.Raw | ToolCallMessage.Raw | ToolResponseMessage.Raw | ToolErrorMessage.Raw;
17
+ type Raw = AssistantEnd.Raw | AssistantMessage.Raw | AssistantProsody.Raw | ChatMetadata.Raw | WebSocketError.Raw | UserInterruption.Raw | UserMessage.Raw | ToolCallMessage.Raw | ToolResponseMessage.Raw | ToolErrorMessage.Raw | SessionSettings.Raw;
17
18
  }