hume 0.13.3 → 0.13.5

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 (91) hide show
  1. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -5
  2. package/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  3. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  4. package/api/resources/empathicVoice/types/ChatMetadata.d.ts +2 -2
  5. package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  6. package/api/resources/empathicVoice/types/SessionSettings.d.ts +9 -7
  7. package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -1
  8. package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +2 -2
  9. package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -3
  10. package/api/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  11. package/api/resources/tts/types/PublishTts.d.ts +23 -0
  12. package/api/resources/tts/types/PublishTts.js +5 -0
  13. package/api/resources/tts/types/SnippetAudioChunk.d.ts +6 -1
  14. package/api/resources/tts/types/index.d.ts +7 -6
  15. package/api/resources/tts/types/index.js +7 -6
  16. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -5
  17. package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  18. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  19. package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +2 -2
  20. package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  21. package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +9 -7
  22. package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -1
  23. package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +2 -2
  24. package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -3
  25. package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  26. package/dist/api/resources/tts/types/PublishTts.d.ts +23 -0
  27. package/dist/api/resources/tts/types/PublishTts.js +5 -0
  28. package/dist/api/resources/tts/types/SnippetAudioChunk.d.ts +6 -1
  29. package/dist/api/resources/tts/types/index.d.ts +7 -6
  30. package/dist/api/resources/tts/types/index.js +7 -6
  31. package/dist/serialization/resources/empathicVoice/types/SessionSettings.d.ts +1 -0
  32. package/dist/serialization/resources/empathicVoice/types/SessionSettings.js +1 -0
  33. package/dist/serialization/resources/tts/types/PublishTts.d.ts +19 -0
  34. package/dist/serialization/resources/tts/types/PublishTts.js +50 -0
  35. package/dist/serialization/resources/tts/types/SnippetAudioChunk.d.ts +2 -1
  36. package/dist/serialization/resources/tts/types/SnippetAudioChunk.js +2 -1
  37. package/dist/serialization/resources/tts/types/index.d.ts +7 -6
  38. package/dist/serialization/resources/tts/types/index.js +7 -6
  39. package/dist/version.d.ts +1 -1
  40. package/dist/version.js +1 -1
  41. package/dist/wrapper/EVIWebAudioPlayer.d.ts +6 -7
  42. package/dist/wrapper/EVIWebAudioPlayer.js +237 -73
  43. package/dist/wrapper/SilenceFiller.d.ts +85 -0
  44. package/dist/wrapper/SilenceFiller.js +203 -0
  45. package/dist/wrapper/collate.d.ts +36 -0
  46. package/dist/wrapper/collate.js +126 -0
  47. package/dist/wrapper/convertFrequencyScale.d.ts +1 -0
  48. package/dist/wrapper/convertFrequencyScale.js +28 -0
  49. package/dist/wrapper/generateEmptyFft.d.ts +1 -0
  50. package/dist/wrapper/generateEmptyFft.js +6 -0
  51. package/dist/wrapper/index.d.ts +2 -0
  52. package/dist/wrapper/index.js +5 -1
  53. package/package.json +2 -1
  54. package/serialization/resources/empathicVoice/types/SessionSettings.d.ts +1 -0
  55. package/serialization/resources/empathicVoice/types/SessionSettings.js +1 -0
  56. package/serialization/resources/tts/types/PublishTts.d.ts +19 -0
  57. package/serialization/resources/tts/types/PublishTts.js +50 -0
  58. package/serialization/resources/tts/types/SnippetAudioChunk.d.ts +2 -1
  59. package/serialization/resources/tts/types/SnippetAudioChunk.js +2 -1
  60. package/serialization/resources/tts/types/index.d.ts +7 -6
  61. package/serialization/resources/tts/types/index.js +7 -6
  62. package/version.d.ts +1 -1
  63. package/version.js +1 -1
  64. package/wrapper/EVIWebAudioPlayer.d.ts +6 -7
  65. package/wrapper/EVIWebAudioPlayer.js +237 -73
  66. package/wrapper/SilenceFiller.d.ts +85 -0
  67. package/wrapper/SilenceFiller.js +203 -0
  68. package/wrapper/collate.d.ts +36 -0
  69. package/wrapper/collate.js +126 -0
  70. package/wrapper/convertFrequencyScale.d.ts +1 -0
  71. package/wrapper/convertFrequencyScale.js +28 -0
  72. package/wrapper/generateEmptyFft.d.ts +1 -0
  73. package/wrapper/generateEmptyFft.js +6 -0
  74. package/wrapper/index.d.ts +2 -0
  75. package/wrapper/index.js +5 -1
  76. package/.mock/definition/api.yml +0 -12
  77. package/.mock/definition/empathic-voice/__package__.yml +0 -2973
  78. package/.mock/definition/empathic-voice/chat.yml +0 -175
  79. package/.mock/definition/empathic-voice/chatGroups.yml +0 -627
  80. package/.mock/definition/empathic-voice/chatWebhooks.yml +0 -30
  81. package/.mock/definition/empathic-voice/chats.yml +0 -506
  82. package/.mock/definition/empathic-voice/configs.yml +0 -852
  83. package/.mock/definition/empathic-voice/prompts.yml +0 -558
  84. package/.mock/definition/empathic-voice/tools.yml +0 -626
  85. package/.mock/definition/expression-measurement/__package__.yml +0 -1
  86. package/.mock/definition/expression-measurement/batch/__package__.yml +0 -1803
  87. package/.mock/definition/expression-measurement/stream/__package__.yml +0 -113
  88. package/.mock/definition/expression-measurement/stream/stream.yml +0 -438
  89. package/.mock/definition/tts/__package__.yml +0 -660
  90. package/.mock/definition/tts/voices.yml +0 -143
  91. package/.mock/fern.config.json +0 -4
@@ -37,11 +37,7 @@ import * as Hume from "../../../../../../index";
37
37
  * }
38
38
  */
39
39
  export interface PostedConfig {
40
- /**
41
- * Specifies the EVI version to use. See our [EVI Version Guide](/docs/speech-to-speech-evi/configuration/evi-version) for differences between versions.
42
- *
43
- * **We're officially sunsetting EVI versions 1 and 2 on August 30, 2025**. To keep things running smoothly, be sure to [migrate to EVI 3](/docs/speech-to-speech-evi/configuration/evi-version#migrating-to-evi-3) before then.
44
- */
40
+ /** EVI version to use. Only version `3` is supported. */
45
41
  eviVersion: string;
46
42
  /** Name applied to all versions of a particular Config. */
47
43
  name: string;
@@ -12,7 +12,7 @@ export interface AssistantInput {
12
12
  /**
13
13
  * Assistant text to synthesize into spoken audio and insert into the conversation.
14
14
  *
15
- * EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. 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](/reference/empathic-voice-interface-evi/chat/chat#receive.AssistantMessage.type).
15
+ * EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. 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](/reference/speech-to-speech-evi/chat#receive.AssistantMessage).
16
16
  */
17
17
  text: string;
18
18
  }
@@ -20,6 +20,6 @@ export interface AssistantMessage {
20
20
  message: Hume.empathicVoice.ChatMessage;
21
21
  /** Inference model results. */
22
22
  models: Hume.empathicVoice.Inference;
23
- /** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/empathic-voice-interface-evi/chat/chat#send.AssistantInput.text). */
23
+ /** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/speech-to-speech-evi/chat#send.AssistantInput.text). */
24
24
  fromText: boolean;
25
25
  }
@@ -16,9 +16,9 @@ export interface ChatMetadata {
16
16
  /**
17
17
  * ID of the Chat Group.
18
18
  *
19
- * Used to resume a Chat when passed in the [resumed_chat_group_id](/reference/empathic-voice-interface-evi/chat/chat#request.query.resumed_chat_group_id) query parameter of a subsequent connection request. This allows EVI to continue the conversation from where it left off within the Chat Group.
19
+ * Used to resume a Chat when passed in the [resumed_chat_group_id](/reference/speech-to-speech-evi/chat#request.query.resumed_chat_group_id) query parameter of a subsequent connection request. This allows EVI to continue the conversation from where it left off within the Chat Group.
20
20
  *
21
- * Learn more about [supporting chat resumability](/docs/empathic-voice-interface-evi/faq#does-evi-support-chat-resumability) from the EVI FAQ.
21
+ * Learn more about [supporting chat resumability](/docs/speech-to-speech-evi/faq#does-evi-support-chat-resumability) from the EVI FAQ.
22
22
  */
23
23
  chatGroupId: string;
24
24
  /** ID of the Chat session. Allows the Chat session to be tracked and referenced. */
@@ -8,7 +8,7 @@ export interface PauseAssistantMessage {
8
8
  /**
9
9
  * The type of message sent through the socket; must be `pause_assistant_message` for our server to correctly identify and process it as a Pause Assistant message.
10
10
  *
11
- * Once this message is sent, EVI will not respond until a [Resume Assistant message](/reference/empathic-voice-interface-evi/chat/chat#send.ResumeAssistantMessage.type) is sent. When paused, EVI won't respond, but transcriptions of your audio inputs will still be recorded.
11
+ * Once this message is sent, EVI will not respond until a [Resume Assistant message](/reference/speech-to-speech-evi/chat#send.ResumeAssistantMessage) is sent. When paused, EVI won't respond, but transcriptions of your audio inputs will still be recorded.
12
12
  */
13
13
  type: "pause_assistant_message";
14
14
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -11,7 +11,7 @@ export interface SessionSettings {
11
11
  *
12
12
  * Session settings are temporary and apply only to the current Chat session. These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience.
13
13
  *
14
- * For more information, please refer to the [Session Settings guide](/docs/empathic-voice-interface-evi/configuration/session-settings).
14
+ * For more information, please refer to the [Session Settings guide](/docs/speech-to-speech-evi/configuration/session-settings).
15
15
  */
16
16
  type: "session_settings";
17
17
  /**
@@ -19,7 +19,7 @@ export interface SessionSettings {
19
19
  *
20
20
  * If included, the response sent from Hume to your backend will include this ID. This allows you to correlate frontend users with their incoming messages.
21
21
  *
22
- * It is recommended to pass a `custom_session_id` if you are using a Custom Language Model. Please see our guide to [using a custom language model](/docs/empathic-voice-interface-evi/guides/custom-language-model) with EVI to learn more.
22
+ * It is recommended to pass a `custom_session_id` if you are using a Custom Language Model. Please see our guide to [using a custom language model](/docs/speech-to-speech-evi/guides/custom-language-model) with EVI to learn more.
23
23
  */
24
24
  customSessionId?: string;
25
25
  /**
@@ -29,7 +29,7 @@ export interface SessionSettings {
29
29
  *
30
30
  * You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles.
31
31
  *
32
- * For help writing a system prompt, see our [Prompting Guide](/docs/empathic-voice-interface-evi/guides/prompting).
32
+ * For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting).
33
33
  */
34
34
  systemPrompt?: string;
35
35
  /**
@@ -43,7 +43,7 @@ export interface SessionSettings {
43
43
  /**
44
44
  * Configuration details for the audio input used during the session. Ensures the audio is being correctly set up for processing.
45
45
  *
46
- * This optional field is only required when the audio input is encoded in PCM Linear 16 (16-bit, little-endian, signed PCM WAV data). For detailed instructions on how to configure session settings for PCM Linear 16 audio, please refer to the [Session Settings guide](/docs/empathic-voice-interface-evi/configuration/session-settings).
46
+ * This optional field is only required when the audio input is encoded in PCM Linear 16 (16-bit, little-endian, signed PCM WAV data). For detailed instructions on how to configure session settings for PCM Linear 16 audio, please refer to the [Session Settings guide](/docs/speech-to-speech-evi/configuration/session-settings).
47
47
  */
48
48
  audio?: Hume.empathicVoice.AudioConfiguration;
49
49
  /**
@@ -55,13 +55,13 @@ export interface SessionSettings {
55
55
  /**
56
56
  * List of user-defined tools to enable for the session.
57
57
  *
58
- * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/empathic-voice-interface-evi/features/tool-use).
58
+ * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use).
59
59
  */
60
60
  tools?: Hume.empathicVoice.Tool[];
61
61
  /**
62
62
  * List of built-in tools to enable for the session.
63
63
  *
64
- * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/empathic-voice-interface-evi/features/tool-use).
64
+ * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use).
65
65
  *
66
66
  * Currently, the only built-in tool Hume provides is **Web Search**. When enabled, Web Search equips EVI with the ability to search the web for up-to-date information.
67
67
  */
@@ -72,7 +72,9 @@ export interface SessionSettings {
72
72
  *
73
73
  * 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.
74
74
  *
75
- * Using this field, you can personalize responses based on session-specific details. For more guidance, see our [guide on using dynamic variables](/docs/empathic-voice-interface-evi/features/dynamic-variables).
75
+ * 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).
76
76
  */
77
77
  variables?: Record<string, Hume.empathicVoice.SessionSettingsVariablesValue>;
78
+ /** Allows you to change the voice during an active chat. Updating the voice does not affect chat context or conversation history. */
79
+ voiceId?: string;
78
80
  }
@@ -30,6 +30,6 @@ export interface ToolCallMessage {
30
30
  customSessionId?: string;
31
31
  /** Type of tool called. Either `builtin` for natively implemented tools, like web search, or `function` for user-defined tools. */
32
32
  toolType?: Hume.empathicVoice.ToolType;
33
- /** Indicates whether a response to the tool call is required from the developer, either in the form of a [Tool Response message](/reference/empathic-voice-interface-evi/chat/chat#send.ToolResponseMessage.type) or a [Tool Error message](/reference/empathic-voice-interface-evi/chat/chat#send.ToolErrorMessage.type). */
33
+ /** Indicates whether a response to the tool call is required from the developer, either in the form of a [Tool Response message](/reference/speech-to-speech-evi/chat#send.ToolResponseMessage) or a [Tool Error message](/reference/speech-to-speech-evi/chat#send.ToolErrorMessage). */
34
34
  responseRequired: boolean;
35
35
  }
@@ -9,7 +9,7 @@ export interface ToolErrorMessage {
9
9
  /**
10
10
  * The type of message sent through the socket; for a Tool Error message, this must be `tool_error`.
11
11
  *
12
- * Upon receiving a [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type) and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
12
+ * Upon receiving a [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage) and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
13
13
  */
14
14
  type: "tool_error";
15
15
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -19,7 +19,7 @@ export interface ToolErrorMessage {
19
19
  /**
20
20
  * The unique identifier for a specific tool call instance.
21
21
  *
22
- * This ID is used to track the request and response of a particular tool invocation, ensuring that the Tool Error message is linked to the appropriate tool call request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type).
22
+ * This ID is used to track the request and response of a particular tool invocation, ensuring that the Tool Error message is linked to the appropriate tool call request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage).
23
23
  */
24
24
  toolCallId: string;
25
25
  /** Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the tool errors. */
@@ -9,7 +9,7 @@ export interface ToolResponseMessage {
9
9
  /**
10
10
  * The type of message sent through the socket; for a Tool Response message, this must be `tool_response`.
11
11
  *
12
- * Upon receiving a [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type) and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
12
+ * Upon receiving a [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage) and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
13
13
  */
14
14
  type: "tool_response";
15
15
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -17,7 +17,7 @@ export interface ToolResponseMessage {
17
17
  /**
18
18
  * The unique identifier for a specific tool call instance.
19
19
  *
20
- * This ID is used to track the request and response of a particular tool invocation, ensuring that the correct response is linked to the appropriate request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.tool_call_id).
20
+ * This ID is used to track the request and response of a particular tool invocation, ensuring that the correct response is linked to the appropriate request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage.tool_call_id).
21
21
  */
22
22
  toolCallId: string;
23
23
  /** Return value of the tool call. Contains the output generated by the tool to pass back to EVI. */
@@ -25,7 +25,7 @@ export interface ToolResponseMessage {
25
25
  /**
26
26
  * Name of the tool.
27
27
  *
28
- * Include this optional field to help the supplemental LLM identify which tool generated the response. The specified `tool_name` must match the one received in the [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type).
28
+ * Include this optional field to help the supplemental LLM identify which tool generated the response. The specified `tool_name` must match the one received in the [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage).
29
29
  */
30
30
  toolName?: string;
31
31
  /** Type of tool called. Either `builtin` for natively implemented tools, like web search, or `function` for user-defined tools. */
@@ -9,7 +9,7 @@ export interface UserMessage {
9
9
  /**
10
10
  * The type of message sent through the socket; for a User Message, this must be `user_message`.
11
11
  *
12
- * This message contains both a transcript of the user's input and the expression measurement predictions if the input was sent as an [Audio Input message](/reference/empathic-voice-interface-evi/chat/chat#send.AudioInput.type). Expression measurement predictions are not provided for a [User Input message](/reference/empathic-voice-interface-evi/chat/chat#send.UserInput.type), as the prosody model relies on audio input and cannot process text alone.
12
+ * This message contains both a transcript of the user's input and the expression measurement predictions if the input was sent as an [Audio Input message](/reference/speech-to-speech-evi/chat#send.AudioInput). Expression measurement predictions are not provided for a [User Input message](/reference/speech-to-speech-evi/chat#send.UserInput), as the prosody model relies on audio input and cannot process text alone.
13
13
  */
14
14
  type: "user_message";
15
15
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -20,7 +20,7 @@ export interface UserMessage {
20
20
  models: Hume.empathicVoice.Inference;
21
21
  /** Start and End time of user message. */
22
22
  time: Hume.empathicVoice.MillisecondInterval;
23
- /** Indicates if this message was inserted into the conversation as text from a [User Input](/reference/empathic-voice-interface-evi/chat/chat#send.UserInput.text) message. */
23
+ /** Indicates if this message was inserted into the conversation as text from a [User Input](/reference/speech-to-speech-evi/chat#send.UserInput.text) message. */
24
24
  fromText: boolean;
25
25
  /**
26
26
  * Indicates whether this `UserMessage` contains an interim (unfinalized) transcript.
@@ -28,7 +28,7 @@ export interface UserMessage {
28
28
  * - `true`: the transcript is provisional; words may be repeated or refined in subsequent `UserMessage` responses as additional audio is processed.
29
29
  * - `false`: the transcript is final and complete.
30
30
  *
31
- * Interim transcripts are only sent when the [`verbose_transcription`](/reference/empathic-voice-interface-evi/chat/chat#request.query.verbose_transcription) query parameter is set to `true` in the initial handshake.
31
+ * Interim transcripts are only sent when the [`verbose_transcription`](/reference/speech-to-speech-evi/chat#request.query.verbose_transcription) query parameter is set to `true` in the initial handshake.
32
32
  */
33
33
  interim: boolean;
34
34
  }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * Input message type for the TTS stream.
7
+ */
8
+ export interface PublishTts {
9
+ /** The input text to be converted to speech output. */
10
+ text?: string;
11
+ /** Natural language instructions describing how the text should be spoken by the model (e.g., `"a soft, gentle voice with a strong British accent"`). */
12
+ description?: string;
13
+ /** The name or ID of the voice from the `Voice Library` to be used as the speaker for this and all subsequent utterances, until the `"voice"` field is updated again. */
14
+ voice?: Hume.tts.PostedUtteranceVoice;
15
+ /** A relative measure of how fast this utterance should be spoken. */
16
+ speed?: number;
17
+ /** Duration of trailing silence (in seconds) to add to this utterance */
18
+ trailingSilence?: number;
19
+ /** Force the generation of audio regardless of how much text has been supplied. */
20
+ flush?: boolean;
21
+ /** Force the generation of audio and close the stream. */
22
+ close?: boolean;
23
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Hume from "../../../index";
5
+ /**
6
+ * Metadata for a chunk of generated audio.
7
+ */
5
8
  export interface SnippetAudioChunk {
9
+ /** ID of the initiating request. */
10
+ requestId: string;
6
11
  /** The generation ID of the parent snippet that this chunk corresponds to. */
7
12
  generationId: string;
8
13
  /** The ID of the parent snippet that this chunk corresponds to. */
@@ -21,5 +26,5 @@ export interface SnippetAudioChunk {
21
26
  isLastChunk: boolean;
22
27
  /** The index of the utterance in the request that the parent snippet of this chunk corresponds to. */
23
28
  utteranceIndex?: number;
24
- snippet: Hume.tts.Snippet;
29
+ snippet?: Hume.tts.Snippet;
25
30
  }
@@ -1,7 +1,13 @@
1
+ export * from "./PublishTts";
2
+ export * from "./PostedUtteranceVoiceWithId";
3
+ export * from "./PostedUtteranceVoiceWithName";
4
+ export * from "./VoiceProvider";
5
+ export * from "./PostedUtteranceVoice";
6
+ export * from "./AudioFormatType";
7
+ export * from "./SnippetAudioChunk";
1
8
  export * from "./PostedContextWithGenerationId";
2
9
  export * from "./PostedContextWithUtterances";
3
10
  export * from "./AudioEncoding";
4
- export * from "./AudioFormatType";
5
11
  export * from "./ReturnGeneration";
6
12
  export * from "./HttpValidationError";
7
13
  export * from "./FormatMp3";
@@ -12,14 +18,9 @@ export * from "./ReturnTts";
12
18
  export * from "./ReturnVoice";
13
19
  export * from "./FormatPcm";
14
20
  export * from "./Snippet";
15
- export * from "./SnippetAudioChunk";
16
21
  export * from "./PostedUtterance";
17
22
  export * from "./ValidationErrorLocItem";
18
23
  export * from "./ValidationError";
19
- export * from "./PostedUtteranceVoiceWithId";
20
- export * from "./PostedUtteranceVoiceWithName";
21
- export * from "./VoiceProvider";
22
- export * from "./PostedUtteranceVoice";
23
24
  export * from "./FormatWav";
24
25
  export * from "./ErrorResponse";
25
26
  export * from "./ReturnPagedVoices";
@@ -14,10 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PublishTts"), exports);
18
+ __exportStar(require("./PostedUtteranceVoiceWithId"), exports);
19
+ __exportStar(require("./PostedUtteranceVoiceWithName"), exports);
20
+ __exportStar(require("./VoiceProvider"), exports);
21
+ __exportStar(require("./PostedUtteranceVoice"), exports);
22
+ __exportStar(require("./AudioFormatType"), exports);
23
+ __exportStar(require("./SnippetAudioChunk"), exports);
17
24
  __exportStar(require("./PostedContextWithGenerationId"), exports);
18
25
  __exportStar(require("./PostedContextWithUtterances"), exports);
19
26
  __exportStar(require("./AudioEncoding"), exports);
20
- __exportStar(require("./AudioFormatType"), exports);
21
27
  __exportStar(require("./ReturnGeneration"), exports);
22
28
  __exportStar(require("./HttpValidationError"), exports);
23
29
  __exportStar(require("./FormatMp3"), exports);
@@ -28,14 +34,9 @@ __exportStar(require("./ReturnTts"), exports);
28
34
  __exportStar(require("./ReturnVoice"), exports);
29
35
  __exportStar(require("./FormatPcm"), exports);
30
36
  __exportStar(require("./Snippet"), exports);
31
- __exportStar(require("./SnippetAudioChunk"), exports);
32
37
  __exportStar(require("./PostedUtterance"), exports);
33
38
  __exportStar(require("./ValidationErrorLocItem"), exports);
34
39
  __exportStar(require("./ValidationError"), exports);
35
- __exportStar(require("./PostedUtteranceVoiceWithId"), exports);
36
- __exportStar(require("./PostedUtteranceVoiceWithName"), exports);
37
- __exportStar(require("./VoiceProvider"), exports);
38
- __exportStar(require("./PostedUtteranceVoice"), exports);
39
40
  __exportStar(require("./FormatWav"), exports);
40
41
  __exportStar(require("./ErrorResponse"), exports);
41
42
  __exportStar(require("./ReturnPagedVoices"), exports);
@@ -37,11 +37,7 @@ import * as Hume from "../../../../../../index";
37
37
  * }
38
38
  */
39
39
  export interface PostedConfig {
40
- /**
41
- * Specifies the EVI version to use. See our [EVI Version Guide](/docs/speech-to-speech-evi/configuration/evi-version) for differences between versions.
42
- *
43
- * **We're officially sunsetting EVI versions 1 and 2 on August 30, 2025**. To keep things running smoothly, be sure to [migrate to EVI 3](/docs/speech-to-speech-evi/configuration/evi-version#migrating-to-evi-3) before then.
44
- */
40
+ /** EVI version to use. Only version `3` is supported. */
45
41
  eviVersion: string;
46
42
  /** Name applied to all versions of a particular Config. */
47
43
  name: string;
@@ -12,7 +12,7 @@ export interface AssistantInput {
12
12
  /**
13
13
  * Assistant text to synthesize into spoken audio and insert into the conversation.
14
14
  *
15
- * EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. 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](/reference/empathic-voice-interface-evi/chat/chat#receive.AssistantMessage.type).
15
+ * EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. 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](/reference/speech-to-speech-evi/chat#receive.AssistantMessage).
16
16
  */
17
17
  text: string;
18
18
  }
@@ -20,6 +20,6 @@ export interface AssistantMessage {
20
20
  message: Hume.empathicVoice.ChatMessage;
21
21
  /** Inference model results. */
22
22
  models: Hume.empathicVoice.Inference;
23
- /** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/empathic-voice-interface-evi/chat/chat#send.AssistantInput.text). */
23
+ /** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/speech-to-speech-evi/chat#send.AssistantInput.text). */
24
24
  fromText: boolean;
25
25
  }
@@ -16,9 +16,9 @@ export interface ChatMetadata {
16
16
  /**
17
17
  * ID of the Chat Group.
18
18
  *
19
- * Used to resume a Chat when passed in the [resumed_chat_group_id](/reference/empathic-voice-interface-evi/chat/chat#request.query.resumed_chat_group_id) query parameter of a subsequent connection request. This allows EVI to continue the conversation from where it left off within the Chat Group.
19
+ * Used to resume a Chat when passed in the [resumed_chat_group_id](/reference/speech-to-speech-evi/chat#request.query.resumed_chat_group_id) query parameter of a subsequent connection request. This allows EVI to continue the conversation from where it left off within the Chat Group.
20
20
  *
21
- * Learn more about [supporting chat resumability](/docs/empathic-voice-interface-evi/faq#does-evi-support-chat-resumability) from the EVI FAQ.
21
+ * Learn more about [supporting chat resumability](/docs/speech-to-speech-evi/faq#does-evi-support-chat-resumability) from the EVI FAQ.
22
22
  */
23
23
  chatGroupId: string;
24
24
  /** ID of the Chat session. Allows the Chat session to be tracked and referenced. */
@@ -8,7 +8,7 @@ export interface PauseAssistantMessage {
8
8
  /**
9
9
  * The type of message sent through the socket; must be `pause_assistant_message` for our server to correctly identify and process it as a Pause Assistant message.
10
10
  *
11
- * Once this message is sent, EVI will not respond until a [Resume Assistant message](/reference/empathic-voice-interface-evi/chat/chat#send.ResumeAssistantMessage.type) is sent. When paused, EVI won't respond, but transcriptions of your audio inputs will still be recorded.
11
+ * Once this message is sent, EVI will not respond until a [Resume Assistant message](/reference/speech-to-speech-evi/chat#send.ResumeAssistantMessage) is sent. When paused, EVI won't respond, but transcriptions of your audio inputs will still be recorded.
12
12
  */
13
13
  type: "pause_assistant_message";
14
14
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -11,7 +11,7 @@ export interface SessionSettings {
11
11
  *
12
12
  * Session settings are temporary and apply only to the current Chat session. These settings can be adjusted dynamically based on the requirements of each session to ensure optimal performance and user experience.
13
13
  *
14
- * For more information, please refer to the [Session Settings guide](/docs/empathic-voice-interface-evi/configuration/session-settings).
14
+ * For more information, please refer to the [Session Settings guide](/docs/speech-to-speech-evi/configuration/session-settings).
15
15
  */
16
16
  type: "session_settings";
17
17
  /**
@@ -19,7 +19,7 @@ export interface SessionSettings {
19
19
  *
20
20
  * If included, the response sent from Hume to your backend will include this ID. This allows you to correlate frontend users with their incoming messages.
21
21
  *
22
- * It is recommended to pass a `custom_session_id` if you are using a Custom Language Model. Please see our guide to [using a custom language model](/docs/empathic-voice-interface-evi/guides/custom-language-model) with EVI to learn more.
22
+ * It is recommended to pass a `custom_session_id` if you are using a Custom Language Model. Please see our guide to [using a custom language model](/docs/speech-to-speech-evi/guides/custom-language-model) with EVI to learn more.
23
23
  */
24
24
  customSessionId?: string;
25
25
  /**
@@ -29,7 +29,7 @@ export interface SessionSettings {
29
29
  *
30
30
  * You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles.
31
31
  *
32
- * For help writing a system prompt, see our [Prompting Guide](/docs/empathic-voice-interface-evi/guides/prompting).
32
+ * For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting).
33
33
  */
34
34
  systemPrompt?: string;
35
35
  /**
@@ -43,7 +43,7 @@ export interface SessionSettings {
43
43
  /**
44
44
  * Configuration details for the audio input used during the session. Ensures the audio is being correctly set up for processing.
45
45
  *
46
- * This optional field is only required when the audio input is encoded in PCM Linear 16 (16-bit, little-endian, signed PCM WAV data). For detailed instructions on how to configure session settings for PCM Linear 16 audio, please refer to the [Session Settings guide](/docs/empathic-voice-interface-evi/configuration/session-settings).
46
+ * This optional field is only required when the audio input is encoded in PCM Linear 16 (16-bit, little-endian, signed PCM WAV data). For detailed instructions on how to configure session settings for PCM Linear 16 audio, please refer to the [Session Settings guide](/docs/speech-to-speech-evi/configuration/session-settings).
47
47
  */
48
48
  audio?: Hume.empathicVoice.AudioConfiguration;
49
49
  /**
@@ -55,13 +55,13 @@ export interface SessionSettings {
55
55
  /**
56
56
  * List of user-defined tools to enable for the session.
57
57
  *
58
- * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/empathic-voice-interface-evi/features/tool-use).
58
+ * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use).
59
59
  */
60
60
  tools?: Hume.empathicVoice.Tool[];
61
61
  /**
62
62
  * List of built-in tools to enable for the session.
63
63
  *
64
- * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/empathic-voice-interface-evi/features/tool-use).
64
+ * Tools are resources used by EVI to perform various tasks, such as searching the web or calling external APIs. Built-in tools, like web search, are natively integrated, while user-defined tools are created and invoked by the user. To learn more, see our [Tool Use Guide](/docs/speech-to-speech-evi/features/tool-use).
65
65
  *
66
66
  * Currently, the only built-in tool Hume provides is **Web Search**. When enabled, Web Search equips EVI with the ability to search the web for up-to-date information.
67
67
  */
@@ -72,7 +72,9 @@ export interface SessionSettings {
72
72
  *
73
73
  * 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.
74
74
  *
75
- * Using this field, you can personalize responses based on session-specific details. For more guidance, see our [guide on using dynamic variables](/docs/empathic-voice-interface-evi/features/dynamic-variables).
75
+ * 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).
76
76
  */
77
77
  variables?: Record<string, Hume.empathicVoice.SessionSettingsVariablesValue>;
78
+ /** Allows you to change the voice during an active chat. Updating the voice does not affect chat context or conversation history. */
79
+ voiceId?: string;
78
80
  }
@@ -30,6 +30,6 @@ export interface ToolCallMessage {
30
30
  customSessionId?: string;
31
31
  /** Type of tool called. Either `builtin` for natively implemented tools, like web search, or `function` for user-defined tools. */
32
32
  toolType?: Hume.empathicVoice.ToolType;
33
- /** Indicates whether a response to the tool call is required from the developer, either in the form of a [Tool Response message](/reference/empathic-voice-interface-evi/chat/chat#send.ToolResponseMessage.type) or a [Tool Error message](/reference/empathic-voice-interface-evi/chat/chat#send.ToolErrorMessage.type). */
33
+ /** Indicates whether a response to the tool call is required from the developer, either in the form of a [Tool Response message](/reference/speech-to-speech-evi/chat#send.ToolResponseMessage) or a [Tool Error message](/reference/speech-to-speech-evi/chat#send.ToolErrorMessage). */
34
34
  responseRequired: boolean;
35
35
  }
@@ -9,7 +9,7 @@ export interface ToolErrorMessage {
9
9
  /**
10
10
  * The type of message sent through the socket; for a Tool Error message, this must be `tool_error`.
11
11
  *
12
- * Upon receiving a [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type) and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
12
+ * Upon receiving a [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage) and failing to invoke the function, this message is sent to notify EVI of the tool's failure.
13
13
  */
14
14
  type: "tool_error";
15
15
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -19,7 +19,7 @@ export interface ToolErrorMessage {
19
19
  /**
20
20
  * The unique identifier for a specific tool call instance.
21
21
  *
22
- * This ID is used to track the request and response of a particular tool invocation, ensuring that the Tool Error message is linked to the appropriate tool call request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type).
22
+ * This ID is used to track the request and response of a particular tool invocation, ensuring that the Tool Error message is linked to the appropriate tool call request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage).
23
23
  */
24
24
  toolCallId: string;
25
25
  /** Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the tool errors. */
@@ -9,7 +9,7 @@ export interface ToolResponseMessage {
9
9
  /**
10
10
  * The type of message sent through the socket; for a Tool Response message, this must be `tool_response`.
11
11
  *
12
- * Upon receiving a [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type) and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
12
+ * Upon receiving a [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage) and successfully invoking the function, this message is sent to convey the result of the function call back to EVI.
13
13
  */
14
14
  type: "tool_response";
15
15
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -17,7 +17,7 @@ export interface ToolResponseMessage {
17
17
  /**
18
18
  * The unique identifier for a specific tool call instance.
19
19
  *
20
- * This ID is used to track the request and response of a particular tool invocation, ensuring that the correct response is linked to the appropriate request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.tool_call_id).
20
+ * This ID is used to track the request and response of a particular tool invocation, ensuring that the correct response is linked to the appropriate request. The specified `tool_call_id` must match the one received in the [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage.tool_call_id).
21
21
  */
22
22
  toolCallId: string;
23
23
  /** Return value of the tool call. Contains the output generated by the tool to pass back to EVI. */
@@ -25,7 +25,7 @@ export interface ToolResponseMessage {
25
25
  /**
26
26
  * Name of the tool.
27
27
  *
28
- * Include this optional field to help the supplemental LLM identify which tool generated the response. The specified `tool_name` must match the one received in the [Tool Call message](/reference/empathic-voice-interface-evi/chat/chat#receive.ToolCallMessage.type).
28
+ * Include this optional field to help the supplemental LLM identify which tool generated the response. The specified `tool_name` must match the one received in the [Tool Call message](/reference/speech-to-speech-evi/chat#receive.ToolCallMessage).
29
29
  */
30
30
  toolName?: string;
31
31
  /** Type of tool called. Either `builtin` for natively implemented tools, like web search, or `function` for user-defined tools. */
@@ -9,7 +9,7 @@ export interface UserMessage {
9
9
  /**
10
10
  * The type of message sent through the socket; for a User Message, this must be `user_message`.
11
11
  *
12
- * This message contains both a transcript of the user's input and the expression measurement predictions if the input was sent as an [Audio Input message](/reference/empathic-voice-interface-evi/chat/chat#send.AudioInput.type). Expression measurement predictions are not provided for a [User Input message](/reference/empathic-voice-interface-evi/chat/chat#send.UserInput.type), as the prosody model relies on audio input and cannot process text alone.
12
+ * This message contains both a transcript of the user's input and the expression measurement predictions if the input was sent as an [Audio Input message](/reference/speech-to-speech-evi/chat#send.AudioInput). Expression measurement predictions are not provided for a [User Input message](/reference/speech-to-speech-evi/chat#send.UserInput), as the prosody model relies on audio input and cannot process text alone.
13
13
  */
14
14
  type: "user_message";
15
15
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
@@ -20,7 +20,7 @@ export interface UserMessage {
20
20
  models: Hume.empathicVoice.Inference;
21
21
  /** Start and End time of user message. */
22
22
  time: Hume.empathicVoice.MillisecondInterval;
23
- /** Indicates if this message was inserted into the conversation as text from a [User Input](/reference/empathic-voice-interface-evi/chat/chat#send.UserInput.text) message. */
23
+ /** Indicates if this message was inserted into the conversation as text from a [User Input](/reference/speech-to-speech-evi/chat#send.UserInput.text) message. */
24
24
  fromText: boolean;
25
25
  /**
26
26
  * Indicates whether this `UserMessage` contains an interim (unfinalized) transcript.
@@ -28,7 +28,7 @@ export interface UserMessage {
28
28
  * - `true`: the transcript is provisional; words may be repeated or refined in subsequent `UserMessage` responses as additional audio is processed.
29
29
  * - `false`: the transcript is final and complete.
30
30
  *
31
- * Interim transcripts are only sent when the [`verbose_transcription`](/reference/empathic-voice-interface-evi/chat/chat#request.query.verbose_transcription) query parameter is set to `true` in the initial handshake.
31
+ * Interim transcripts are only sent when the [`verbose_transcription`](/reference/speech-to-speech-evi/chat#request.query.verbose_transcription) query parameter is set to `true` in the initial handshake.
32
32
  */
33
33
  interim: boolean;
34
34
  }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * Input message type for the TTS stream.
7
+ */
8
+ export interface PublishTts {
9
+ /** The input text to be converted to speech output. */
10
+ text?: string;
11
+ /** Natural language instructions describing how the text should be spoken by the model (e.g., `"a soft, gentle voice with a strong British accent"`). */
12
+ description?: string;
13
+ /** The name or ID of the voice from the `Voice Library` to be used as the speaker for this and all subsequent utterances, until the `"voice"` field is updated again. */
14
+ voice?: Hume.tts.PostedUtteranceVoice;
15
+ /** A relative measure of how fast this utterance should be spoken. */
16
+ speed?: number;
17
+ /** Duration of trailing silence (in seconds) to add to this utterance */
18
+ trailingSilence?: number;
19
+ /** Force the generation of audio regardless of how much text has been supplied. */
20
+ flush?: boolean;
21
+ /** Force the generation of audio and close the stream. */
22
+ close?: boolean;
23
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Hume from "../../../index";
5
+ /**
6
+ * Metadata for a chunk of generated audio.
7
+ */
5
8
  export interface SnippetAudioChunk {
9
+ /** ID of the initiating request. */
10
+ requestId: string;
6
11
  /** The generation ID of the parent snippet that this chunk corresponds to. */
7
12
  generationId: string;
8
13
  /** The ID of the parent snippet that this chunk corresponds to. */
@@ -21,5 +26,5 @@ export interface SnippetAudioChunk {
21
26
  isLastChunk: boolean;
22
27
  /** The index of the utterance in the request that the parent snippet of this chunk corresponds to. */
23
28
  utteranceIndex?: number;
24
- snippet: Hume.tts.Snippet;
29
+ snippet?: Hume.tts.Snippet;
25
30
  }