hume 0.11.3 → 0.11.5-beta.0

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 (113) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +186 -61
  2. package/.mock/definition/empathic-voice/chat.yml +1 -8
  3. package/.mock/definition/empathic-voice/configs.yml +7 -1
  4. package/.mock/definition/tts/__package__.yml +17 -14
  5. package/Client.js +2 -2
  6. package/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -0
  7. package/api/resources/empathicVoice/resources/chat/client/Client.js +12 -4
  8. package/api/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +1 -1
  9. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  10. package/api/resources/empathicVoice/types/AssistantProsody.d.ts +21 -0
  11. package/api/resources/empathicVoice/types/AssistantProsody.js +5 -0
  12. package/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +2 -2
  13. package/api/resources/empathicVoice/types/ReturnConfig.d.ts +19 -19
  14. package/api/resources/empathicVoice/types/ReturnPrompt.d.ts +12 -12
  15. package/api/resources/empathicVoice/types/ReturnSignedUri.d.ts +12 -0
  16. package/api/resources/empathicVoice/types/ReturnSignedUri.js +5 -0
  17. package/api/resources/empathicVoice/types/ReturnVoiceOctaveCustom.d.ts +31 -0
  18. package/api/resources/empathicVoice/types/ReturnVoiceOctaveCustom.js +5 -0
  19. package/api/resources/empathicVoice/types/ReturnVoiceOctaveShared.d.ts +15 -0
  20. package/api/resources/empathicVoice/types/ReturnVoiceOctaveShared.js +5 -0
  21. package/api/resources/empathicVoice/types/ReturnVoiceSpec.d.ts +8 -0
  22. package/api/resources/empathicVoice/types/ReturnVoiceSpec.js +5 -0
  23. package/api/resources/empathicVoice/types/ReturnVoiceSpecEvi2.d.ts +14 -0
  24. package/api/resources/empathicVoice/types/ReturnVoiceSpecEvi2.js +5 -0
  25. package/api/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.d.ts +14 -0
  26. package/api/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.js +5 -0
  27. package/api/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.d.ts +14 -0
  28. package/api/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.js +5 -0
  29. package/api/resources/empathicVoice/types/index.d.ts +9 -1
  30. package/api/resources/empathicVoice/types/index.js +9 -1
  31. package/api/resources/tts/types/PostedTts.d.ts +2 -3
  32. package/api/resources/tts/types/PostedUtterance.d.ts +5 -3
  33. package/dist/Client.js +2 -2
  34. package/dist/api/resources/empathicVoice/resources/chat/client/Client.d.ts +1 -0
  35. package/dist/api/resources/empathicVoice/resources/chat/client/Client.js +12 -4
  36. package/dist/api/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +1 -1
  37. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  38. package/dist/api/resources/empathicVoice/types/AssistantProsody.d.ts +21 -0
  39. package/dist/api/resources/empathicVoice/types/AssistantProsody.js +5 -0
  40. package/dist/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +2 -2
  41. package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +19 -19
  42. package/dist/api/resources/empathicVoice/types/ReturnPrompt.d.ts +12 -12
  43. package/dist/api/resources/empathicVoice/types/ReturnSignedUri.d.ts +12 -0
  44. package/dist/api/resources/empathicVoice/types/ReturnSignedUri.js +5 -0
  45. package/dist/api/resources/empathicVoice/types/ReturnVoiceOctaveCustom.d.ts +31 -0
  46. package/dist/api/resources/empathicVoice/types/ReturnVoiceOctaveCustom.js +5 -0
  47. package/dist/api/resources/empathicVoice/types/ReturnVoiceOctaveShared.d.ts +15 -0
  48. package/dist/api/resources/empathicVoice/types/ReturnVoiceOctaveShared.js +5 -0
  49. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpec.d.ts +8 -0
  50. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpec.js +5 -0
  51. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpecEvi2.d.ts +14 -0
  52. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpecEvi2.js +5 -0
  53. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.d.ts +14 -0
  54. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.js +5 -0
  55. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.d.ts +14 -0
  56. package/dist/api/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.js +5 -0
  57. package/dist/api/resources/empathicVoice/types/index.d.ts +9 -1
  58. package/dist/api/resources/empathicVoice/types/index.js +9 -1
  59. package/dist/api/resources/tts/types/PostedTts.d.ts +2 -3
  60. package/dist/api/resources/tts/types/PostedUtterance.d.ts +5 -3
  61. package/dist/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +2 -1
  62. package/dist/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.js +2 -0
  63. package/dist/serialization/resources/empathicVoice/types/AssistantProsody.d.ts +16 -0
  64. package/dist/serialization/resources/empathicVoice/types/AssistantProsody.js +47 -0
  65. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +15 -15
  66. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +15 -15
  67. package/dist/serialization/resources/empathicVoice/types/ReturnPrompt.d.ts +3 -3
  68. package/dist/serialization/resources/empathicVoice/types/ReturnPrompt.js +3 -3
  69. package/dist/serialization/resources/empathicVoice/types/ReturnSignedUri.d.ts +15 -0
  70. package/dist/serialization/resources/empathicVoice/types/ReturnSignedUri.js +46 -0
  71. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceOctaveCustom.d.ts +34 -0
  72. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceOctaveCustom.js +65 -0
  73. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceOctaveShared.d.ts +18 -0
  74. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceOctaveShared.js +49 -0
  75. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpec.d.ts +13 -0
  76. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpec.js +48 -0
  77. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpecEvi2.d.ts +15 -0
  78. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpecEvi2.js +46 -0
  79. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.d.ts +15 -0
  80. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.js +46 -0
  81. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.d.ts +15 -0
  82. package/dist/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.js +46 -0
  83. package/dist/serialization/resources/empathicVoice/types/index.d.ts +9 -1
  84. package/dist/serialization/resources/empathicVoice/types/index.js +9 -1
  85. package/dist/version.d.ts +1 -1
  86. package/dist/version.js +1 -1
  87. package/package.json +1 -1
  88. package/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +2 -1
  89. package/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.js +2 -0
  90. package/serialization/resources/empathicVoice/types/AssistantProsody.d.ts +16 -0
  91. package/serialization/resources/empathicVoice/types/AssistantProsody.js +47 -0
  92. package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +15 -15
  93. package/serialization/resources/empathicVoice/types/ReturnConfig.js +15 -15
  94. package/serialization/resources/empathicVoice/types/ReturnPrompt.d.ts +3 -3
  95. package/serialization/resources/empathicVoice/types/ReturnPrompt.js +3 -3
  96. package/serialization/resources/empathicVoice/types/ReturnSignedUri.d.ts +15 -0
  97. package/serialization/resources/empathicVoice/types/ReturnSignedUri.js +46 -0
  98. package/serialization/resources/empathicVoice/types/ReturnVoiceOctaveCustom.d.ts +34 -0
  99. package/serialization/resources/empathicVoice/types/ReturnVoiceOctaveCustom.js +65 -0
  100. package/serialization/resources/empathicVoice/types/ReturnVoiceOctaveShared.d.ts +18 -0
  101. package/serialization/resources/empathicVoice/types/ReturnVoiceOctaveShared.js +49 -0
  102. package/serialization/resources/empathicVoice/types/ReturnVoiceSpec.d.ts +13 -0
  103. package/serialization/resources/empathicVoice/types/ReturnVoiceSpec.js +48 -0
  104. package/serialization/resources/empathicVoice/types/ReturnVoiceSpecEvi2.d.ts +15 -0
  105. package/serialization/resources/empathicVoice/types/ReturnVoiceSpecEvi2.js +46 -0
  106. package/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.d.ts +15 -0
  107. package/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctavecustom.js +46 -0
  108. package/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.d.ts +15 -0
  109. package/serialization/resources/empathicVoice/types/ReturnVoiceSpecOctaveshared.js +46 -0
  110. package/serialization/resources/empathicVoice/types/index.d.ts +9 -1
  111. package/serialization/resources/empathicVoice/types/index.js +9 -1
  112. package/version.d.ts +1 -1
  113. package/version.js +1 -1
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * A signed URI linking to a file in GCS
6
+ */
7
+ export interface ReturnSignedUri {
8
+ filename?: string;
9
+ method?: string;
10
+ signedUri?: string;
11
+ expirationTimestampMillis?: number;
12
+ }
@@ -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 });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * An octave custom voice specification returned from the server
7
+ */
8
+ export interface ReturnVoiceOctaveCustom {
9
+ id?: string;
10
+ version?: number;
11
+ name?: string;
12
+ description?: string;
13
+ voiceType?: string;
14
+ createdOn?: number;
15
+ modifiedOn?: number;
16
+ voicePrompt?: string;
17
+ normalizationGainDb?: number;
18
+ speakerEmbedding?: string;
19
+ referenceUri?: string;
20
+ referenceAudioFormat?: string;
21
+ cloneReferenceUri?: string;
22
+ cloneReferenceAudioFormat?: string;
23
+ referenceTokens?: string;
24
+ referenceAtoks?: string;
25
+ referenceDecoderDtoks?: string;
26
+ referenceText?: string;
27
+ signedPreviewReferenceUri?: Hume.empathicVoice.ReturnSignedUri;
28
+ signedCloneReferenceUri?: Hume.empathicVoice.ReturnSignedUri;
29
+ imageUri?: string;
30
+ disabled?: boolean;
31
+ }
@@ -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 });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * An octave shared voice specification returned from the server
7
+ */
8
+ export interface ReturnVoiceOctaveShared {
9
+ id?: string;
10
+ version?: number;
11
+ name?: string;
12
+ description?: string;
13
+ referenceSignedUri?: Hume.empathicVoice.ReturnSignedUri;
14
+ imageUri?: string;
15
+ }
@@ -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 });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * An voice specification posted to the server
7
+ */
8
+ export type ReturnVoiceSpec = Hume.empathicVoice.ReturnVoiceSpecEvi2 | Hume.empathicVoice.ReturnVoiceSpecOctavecustom | Hume.empathicVoice.ReturnVoiceSpecOctaveshared;
@@ -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 });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * A specific voice specification for use with EVI 1 or 2
7
+ */
8
+ export interface ReturnVoiceSpecEvi2 {
9
+ /** The provider of the voice to use. Based on the enum VoiceProvider. */
10
+ provider: string;
11
+ /** String with the name of the voice to use. Maximum length of 75 characters. Will be converted to all-uppercase. */
12
+ name?: string;
13
+ customVoice: Hume.empathicVoice.ReturnCustomVoice;
14
+ }
@@ -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 });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * A specific voice specification for an Octave voice
7
+ */
8
+ export interface ReturnVoiceSpecOctavecustom {
9
+ /** The provider of the voice to use. Based on the enum VoiceProvider. */
10
+ provider: string;
11
+ /** String with the name of the voice to use. Maximum length of 75 characters. Will be converted to all-uppercase. */
12
+ name?: string;
13
+ customVoice?: Hume.empathicVoice.ReturnVoiceOctaveCustom;
14
+ }
@@ -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 });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * A specific voice specification for an Octave voice
7
+ */
8
+ export interface ReturnVoiceSpecOctaveshared {
9
+ /** The provider of the voice to use. Based on the enum VoiceProvider. */
10
+ provider: string;
11
+ /** String with the name of the voice to use. Maximum length of 75 characters. Will be converted to all-uppercase. */
12
+ name?: string;
13
+ customVoice?: Hume.empathicVoice.ReturnVoiceOctaveShared;
14
+ }
@@ -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 });
@@ -1,6 +1,7 @@
1
1
  export * from "./AssistantEnd";
2
2
  export * from "./AssistantInput";
3
3
  export * from "./AssistantMessage";
4
+ export * from "./AssistantProsody";
4
5
  export * from "./AudioConfiguration";
5
6
  export * from "./AudioInput";
6
7
  export * from "./AudioOutput";
@@ -49,7 +50,6 @@ export * from "./ReturnUserDefinedToolToolType";
49
50
  export * from "./ReturnUserDefinedToolVersionType";
50
51
  export * from "./ReturnUserDefinedTool";
51
52
  export * from "./ReturnPagedPrompts";
52
- export * from "./ReturnPromptVersionType";
53
53
  export * from "./ReturnPrompt";
54
54
  export * from "./ReturnPagedCustomVoices";
55
55
  export * from "./PostedCustomVoiceBaseVoice";
@@ -75,6 +75,7 @@ export * from "./ReturnChatGroupPagedEventsPaginationDirection";
75
75
  export * from "./ReturnChatGroupPagedEvents";
76
76
  export * from "./ReturnChatGroupPagedAudioReconstructionsPaginationDirection";
77
77
  export * from "./ReturnChatGroupPagedAudioReconstructions";
78
+ export * from "./ReturnPromptVersionType";
78
79
  export * from "./PostedConfigPromptSpec";
79
80
  export * from "./PostedLanguageModel";
80
81
  export * from "./PostedEllmModel";
@@ -88,6 +89,7 @@ export * from "./PostedTimeoutSpecsMaxDuration";
88
89
  export * from "./PostedTimeoutSpecs";
89
90
  export * from "./PostedWebhookEventType";
90
91
  export * from "./PostedWebhookSpec";
92
+ export * from "./ReturnVoiceSpec";
91
93
  export * from "./ReturnLanguageModel";
92
94
  export * from "./ReturnEllmModel";
93
95
  export * from "./ReturnBuiltinToolToolType";
@@ -106,8 +108,14 @@ export * from "./ReturnConfigSpec";
106
108
  export * from "./ReturnChatGroup";
107
109
  export * from "./PostedEventMessageSpec";
108
110
  export * from "./PostedTimeoutSpec";
111
+ export * from "./ReturnVoiceSpecEvi2";
112
+ export * from "./ReturnVoiceSpecOctavecustom";
113
+ export * from "./ReturnVoiceSpecOctaveshared";
109
114
  export * from "./ReturnEventMessageSpec";
110
115
  export * from "./ReturnTimeoutSpec";
116
+ export * from "./ReturnVoiceOctaveCustom";
117
+ export * from "./ReturnVoiceOctaveShared";
118
+ export * from "./ReturnSignedUri";
111
119
  export * from "./PostedVoiceProvider";
112
120
  export * from "./PostedVoice";
113
121
  export * from "./ReturnVoiceProvider";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AssistantEnd"), exports);
18
18
  __exportStar(require("./AssistantInput"), exports);
19
19
  __exportStar(require("./AssistantMessage"), exports);
20
+ __exportStar(require("./AssistantProsody"), exports);
20
21
  __exportStar(require("./AudioConfiguration"), exports);
21
22
  __exportStar(require("./AudioInput"), exports);
22
23
  __exportStar(require("./AudioOutput"), exports);
@@ -65,7 +66,6 @@ __exportStar(require("./ReturnUserDefinedToolToolType"), exports);
65
66
  __exportStar(require("./ReturnUserDefinedToolVersionType"), exports);
66
67
  __exportStar(require("./ReturnUserDefinedTool"), exports);
67
68
  __exportStar(require("./ReturnPagedPrompts"), exports);
68
- __exportStar(require("./ReturnPromptVersionType"), exports);
69
69
  __exportStar(require("./ReturnPrompt"), exports);
70
70
  __exportStar(require("./ReturnPagedCustomVoices"), exports);
71
71
  __exportStar(require("./PostedCustomVoiceBaseVoice"), exports);
@@ -91,6 +91,7 @@ __exportStar(require("./ReturnChatGroupPagedEventsPaginationDirection"), exports
91
91
  __exportStar(require("./ReturnChatGroupPagedEvents"), exports);
92
92
  __exportStar(require("./ReturnChatGroupPagedAudioReconstructionsPaginationDirection"), exports);
93
93
  __exportStar(require("./ReturnChatGroupPagedAudioReconstructions"), exports);
94
+ __exportStar(require("./ReturnPromptVersionType"), exports);
94
95
  __exportStar(require("./PostedConfigPromptSpec"), exports);
95
96
  __exportStar(require("./PostedLanguageModel"), exports);
96
97
  __exportStar(require("./PostedEllmModel"), exports);
@@ -104,6 +105,7 @@ __exportStar(require("./PostedTimeoutSpecsMaxDuration"), exports);
104
105
  __exportStar(require("./PostedTimeoutSpecs"), exports);
105
106
  __exportStar(require("./PostedWebhookEventType"), exports);
106
107
  __exportStar(require("./PostedWebhookSpec"), exports);
108
+ __exportStar(require("./ReturnVoiceSpec"), exports);
107
109
  __exportStar(require("./ReturnLanguageModel"), exports);
108
110
  __exportStar(require("./ReturnEllmModel"), exports);
109
111
  __exportStar(require("./ReturnBuiltinToolToolType"), exports);
@@ -122,8 +124,14 @@ __exportStar(require("./ReturnConfigSpec"), exports);
122
124
  __exportStar(require("./ReturnChatGroup"), exports);
123
125
  __exportStar(require("./PostedEventMessageSpec"), exports);
124
126
  __exportStar(require("./PostedTimeoutSpec"), exports);
127
+ __exportStar(require("./ReturnVoiceSpecEvi2"), exports);
128
+ __exportStar(require("./ReturnVoiceSpecOctavecustom"), exports);
129
+ __exportStar(require("./ReturnVoiceSpecOctaveshared"), exports);
125
130
  __exportStar(require("./ReturnEventMessageSpec"), exports);
126
131
  __exportStar(require("./ReturnTimeoutSpec"), exports);
132
+ __exportStar(require("./ReturnVoiceOctaveCustom"), exports);
133
+ __exportStar(require("./ReturnVoiceOctaveShared"), exports);
134
+ __exportStar(require("./ReturnSignedUri"), exports);
127
135
  __exportStar(require("./PostedVoiceProvider"), exports);
128
136
  __exportStar(require("./PostedVoice"), exports);
129
137
  __exportStar(require("./ReturnVoiceProvider"), exports);
@@ -29,10 +29,9 @@ export interface PostedTts {
29
29
  utterances: Hume.tts.PostedUtterance[];
30
30
  /**
31
31
  * Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode).
32
- * - Dynamic voice generation is not supported with this mode; a predefined [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified in your request.
33
- * - This mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)).
32
+ * - A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode.
33
+ * - Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)).
34
34
  * - Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted).
35
- * - With `instant_mode` enabled, **requests incur a 10% higher cost** due to increased compute and resource requirements.
36
35
  */
37
36
  instantMode?: boolean;
38
37
  }
@@ -4,9 +4,11 @@
4
4
  import * as Hume from "../../../index";
5
5
  export interface PostedUtterance {
6
6
  /**
7
- * Natural language instructions describing how the synthesized speech should sound, including but not limited to tone, intonation, pacing, and accent (e.g., 'a soft, gentle voice with a strong British accent').
8
- * - If a Voice is specified in the request, this description serves as acting instructions. For tips on how to effectively guide speech delivery, see our guide on [Acting instructions](/docs/text-to-speech-tts/acting-instructions).
9
- * - If no Voice is specified, a new voice is generated based on this description. See our [prompting guide](/docs/text-to-speech-tts/prompting) for tips on designing a voice.
7
+ * Natural language instructions describing how the synthesized speech should sound, including but not limited to tone, intonation, pacing, and accent.
8
+ *
9
+ * **This field behaves differently depending on whether a voice is specified**:
10
+ * - **Voice specified**: the description will serve as acting directions for delivery. Keep directions concise—100 characters or fewer—for best results. See our guide on [acting instructions](/docs/text-to-speech-tts/acting-instructions).
11
+ * - **Voice not specified**: the description will serve as a voice prompt for generating a voice. See our [prompting guide](/docs/text-to-speech-tts/prompting) for design tips.
10
12
  */
11
13
  description?: string;
12
14
  /** Speed multiplier for the synthesized speech. */
package/dist/Client.js CHANGED
@@ -45,8 +45,8 @@ const fetcherThatAddsHeaders = (fetcherToWrap) => {
45
45
  var _a;
46
46
  const newArgs = Object.assign({}, args);
47
47
  newArgs.headers = (_a = newArgs.headers) !== null && _a !== void 0 ? _a : {};
48
- (newArgs.headers["X-Hume-Client-Name"] = "typescript_sdk"),
49
- (newArgs.headers["X-Hume-Client-Version"] = version_1.SDK_VERSION);
48
+ ((newArgs.headers["X-Hume-Client-Name"] = "typescript_sdk"),
49
+ (newArgs.headers["X-Hume-Client-Version"] = version_1.SDK_VERSION));
50
50
  return fetcherToWrap(args);
51
51
  };
52
52
  };
@@ -2,6 +2,7 @@
2
2
  import * as environments from "../../../../../../environments";
3
3
  import * as core from "../../../../../../core";
4
4
  import { ChatSocket } from "./Socket";
5
+ export declare function createHostnameWithProtocol(environment: string): string;
5
6
  export declare namespace Chat {
6
7
  interface Options {
7
8
  environment?: core.Supplier<environments.HumeEnvironment | string>;
@@ -37,12 +37,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.Chat = void 0;
40
+ exports.createHostnameWithProtocol = createHostnameWithProtocol;
40
41
  /** THIS FILE IS MANUALLY MAINAINED: see .fernignore */
41
42
  const environments = __importStar(require("../../../../../../environments"));
42
43
  const core = __importStar(require("../../../../../../core"));
43
44
  const qs_1 = __importDefault(require("qs"));
44
45
  const Socket_1 = require("./Socket");
45
46
  const version_1 = require("../../../../../../version");
47
+ function createHostnameWithProtocol(environment) {
48
+ const protocol = /(https|http|wss|ws):\/\//.exec(environment);
49
+ if (protocol) {
50
+ return environment.replace("https://", "wss://").replace("http://", "ws://");
51
+ }
52
+ else {
53
+ return `wss://${environment}`;
54
+ }
55
+ }
46
56
  class Chat {
47
57
  constructor(_options) {
48
58
  this._options = _options;
@@ -77,10 +87,8 @@ class Chat {
77
87
  queryParams[name] = value;
78
88
  }
79
89
  }
80
- const environ = ((_a = core.Supplier.get(this._options.environment)) !== null && _a !== void 0 ? _a : environments.HumeEnvironment.Production)
81
- .replace("https://", "wss://")
82
- .replace("http://", "ws://");
83
- const socket = new core.ReconnectingWebSocket(`${environ}/v0/evi/chat?${qs_1.default.stringify(queryParams)}`, [], {
90
+ const hostname = createHostnameWithProtocol((_a = core.Supplier.get(this._options.environment)) !== null && _a !== void 0 ? _a : environments.HumeEnvironment.Production);
91
+ const socket = new core.ReconnectingWebSocket(`${hostname}/v0/evi/chat?${qs_1.default.stringify(queryParams)}`, [], {
84
92
  debug: (_b = args.debug) !== null && _b !== void 0 ? _b : false,
85
93
  maxRetries: (_c = args.reconnectAttempts) !== null && _c !== void 0 ? _c : 30,
86
94
  });
@@ -2,4 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Hume from "../../../../../index";
5
- export type SubscribeEvent = Hume.empathicVoice.AssistantEnd | Hume.empathicVoice.AssistantMessage | Hume.empathicVoice.AudioOutput | Hume.empathicVoice.ChatMetadata | Hume.empathicVoice.WebSocketError | Hume.empathicVoice.UserInterruption | Hume.empathicVoice.UserMessage | Hume.empathicVoice.ToolCallMessage | Hume.empathicVoice.ToolResponseMessage | Hume.empathicVoice.ToolErrorMessage;
5
+ export type SubscribeEvent = Hume.empathicVoice.AssistantEnd | Hume.empathicVoice.AssistantMessage | Hume.empathicVoice.AssistantProsody | Hume.empathicVoice.AudioOutput | Hume.empathicVoice.ChatMetadata | Hume.empathicVoice.WebSocketError | Hume.empathicVoice.UserInterruption | Hume.empathicVoice.UserMessage | Hume.empathicVoice.ToolCallMessage | Hume.empathicVoice.ToolResponseMessage | Hume.empathicVoice.ToolErrorMessage;
@@ -63,6 +63,7 @@ export interface PostedConfig {
63
63
  /** List of built-in tools associated with this Config. */
64
64
  builtinTools?: (Hume.empathicVoice.PostedBuiltinTool | undefined)[];
65
65
  eventMessages?: Hume.empathicVoice.PostedEventMessageSpecs;
66
+ /** Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. */
66
67
  nudges?: Hume.empathicVoice.PostedNudgeSpec;
67
68
  timeouts?: Hume.empathicVoice.PostedTimeoutSpecs;
68
69
  /** Webhook config specifications for each subscriber. */
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * When provided, the output is an Assistant Prosody message.
7
+ */
8
+ export interface AssistantProsody {
9
+ /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
10
+ customSessionId?: string;
11
+ /** Unique identifier for the segment. */
12
+ id?: string;
13
+ /** Inference model results. */
14
+ models: Hume.empathicVoice.Inference;
15
+ /**
16
+ * The type of message sent through the socket; for an Assistant Prosody message, this must be `assistant_PROSODY`.
17
+ *
18
+ * This message the expression measurement predictions of the assistant's audio output.
19
+ */
20
+ type: "assistant_prosody";
21
+ }
@@ -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 });
@@ -5,8 +5,8 @@
5
5
  * A nudge specification posted to the server
6
6
  */
7
7
  export interface PostedNudgeSpec {
8
- /** EVI will nudge user after inactivity */
8
+ /** If true, EVI will 'nudge' the user to speak after a determined interval of silence. */
9
9
  enabled?: boolean;
10
- /** Time interval in seconds after which the nudge will be sent. */
10
+ /** The interval of inactivity (in seconds) before a nudge is triggered. */
11
11
  intervalSecs?: number;
12
12
  }
@@ -6,6 +6,8 @@ import * as Hume from "../../../index";
6
6
  * A specific config version returned from the server
7
7
  */
8
8
  export interface ReturnConfig {
9
+ /** Name applied to all versions of a particular Config. */
10
+ name?: string;
9
11
  /** Identifier for a Config. Formatted as a UUID. */
10
12
  id?: string;
11
13
  /**
@@ -18,36 +20,34 @@ export interface ReturnConfig {
18
20
  version?: number;
19
21
  /** Specifies the EVI version to use. Use `"1"` for version 1, or `"2"` for the latest enhanced version. For a detailed comparison of the two versions, refer to our [guide](/docs/empathic-voice-interface-evi/configuration/evi-version). */
20
22
  eviVersion?: string;
21
- /** An optional description of the Config version. */
22
- versionDescription?: string;
23
- /** Name applied to all versions of a particular Config. */
24
- name?: string;
23
+ timeouts?: Hume.empathicVoice.ReturnTimeoutSpecs;
24
+ nudges?: Hume.empathicVoice.ReturnNudgeSpec;
25
+ /**
26
+ * The eLLM setup associated with this Config.
27
+ *
28
+ * Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody.
29
+ */
30
+ ellmModel?: Hume.empathicVoice.ReturnEllmModel;
31
+ /** A voice specification associated with this Config. */
32
+ voice?: Hume.empathicVoice.ReturnVoice;
33
+ prompt?: Hume.empathicVoice.ReturnPrompt;
34
+ /** List of user-defined tools associated with this Config. */
35
+ tools?: (Hume.empathicVoice.ReturnUserDefinedTool | undefined)[];
36
+ /** Map of webhooks associated with this config. */
37
+ webhooks?: (Hume.empathicVoice.ReturnWebhookSpec | undefined)[];
25
38
  /** Time at which the Config was created. Measured in seconds since the Unix epoch. */
26
39
  createdOn?: number;
27
40
  /** Time at which the Config was last modified. Measured in seconds since the Unix epoch. */
28
41
  modifiedOn?: number;
29
- prompt?: Hume.empathicVoice.ReturnPrompt;
30
- /** A voice specification associated with this Config. */
31
- voice?: Hume.empathicVoice.ReturnVoice;
32
42
  /**
33
43
  * The supplemental language model associated with this Config.
34
44
  *
35
45
  * This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI.
36
46
  */
37
47
  languageModel?: Hume.empathicVoice.ReturnLanguageModel;
38
- /**
39
- * The eLLM setup associated with this Config.
40
- *
41
- * Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody.
42
- */
43
- ellmModel?: Hume.empathicVoice.ReturnEllmModel;
44
- /** List of user-defined tools associated with this Config. */
45
- tools?: (Hume.empathicVoice.ReturnUserDefinedTool | undefined)[];
46
48
  /** List of built-in tools associated with this Config. */
47
49
  builtinTools?: (Hume.empathicVoice.ReturnBuiltinTool | undefined)[];
48
50
  eventMessages?: Hume.empathicVoice.ReturnEventMessageSpecs;
49
- timeouts?: Hume.empathicVoice.ReturnTimeoutSpecs;
50
- nudges?: Hume.empathicVoice.ReturnNudgeSpec;
51
- /** Map of webhooks associated with this config. */
52
- webhooks?: (Hume.empathicVoice.ReturnWebhookSpec | undefined)[];
51
+ /** An optional description of the Config version. */
52
+ versionDescription?: string;
53
53
  }
@@ -6,8 +6,18 @@ import * as Hume from "../../../index";
6
6
  * A Prompt associated with this Config.
7
7
  */
8
8
  export interface ReturnPrompt {
9
+ /** Name applied to all versions of a particular Prompt. */
10
+ name: string;
9
11
  /** Identifier for a Prompt. Formatted as a UUID. */
10
12
  id: string;
13
+ /**
14
+ * Instructions used to shape EVI’s behavior, responses, and style.
15
+ *
16
+ * 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.
17
+ *
18
+ * For help writing a system prompt, see our [Prompting Guide](/docs/empathic-voice-interface-evi/guides/prompting).
19
+ */
20
+ text: string;
11
21
  /**
12
22
  * Version number for a Prompt.
13
23
  *
@@ -18,20 +28,10 @@ export interface ReturnPrompt {
18
28
  version: number;
19
29
  /** Versioning method for a Prompt. Either `FIXED` for using a fixed version number or `LATEST` for auto-updating to the latest version. */
20
30
  versionType: Hume.empathicVoice.ReturnPromptVersionType;
21
- /** An optional description of the Prompt version. */
22
- versionDescription?: string;
23
- /** Name applied to all versions of a particular Prompt. */
24
- name: string;
25
31
  /** Time at which the Prompt was created. Measured in seconds since the Unix epoch. */
26
32
  createdOn: number;
27
33
  /** Time at which the Prompt was last modified. Measured in seconds since the Unix epoch. */
28
34
  modifiedOn: number;
29
- /**
30
- * Instructions used to shape EVI’s behavior, responses, and style.
31
- *
32
- * 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.
33
- *
34
- * For help writing a system prompt, see our [Prompting Guide](/docs/empathic-voice-interface-evi/guides/prompting).
35
- */
36
- text: string;
35
+ /** An optional description of the Prompt version. */
36
+ versionDescription?: string;
37
37
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * A signed URI linking to a file in GCS
6
+ */
7
+ export interface ReturnSignedUri {
8
+ filename?: string;
9
+ method?: string;
10
+ signedUri?: string;
11
+ expirationTimestampMillis?: number;
12
+ }
@@ -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 });
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * An octave custom voice specification returned from the server
7
+ */
8
+ export interface ReturnVoiceOctaveCustom {
9
+ id?: string;
10
+ version?: number;
11
+ name?: string;
12
+ description?: string;
13
+ voiceType?: string;
14
+ createdOn?: number;
15
+ modifiedOn?: number;
16
+ voicePrompt?: string;
17
+ normalizationGainDb?: number;
18
+ speakerEmbedding?: string;
19
+ referenceUri?: string;
20
+ referenceAudioFormat?: string;
21
+ cloneReferenceUri?: string;
22
+ cloneReferenceAudioFormat?: string;
23
+ referenceTokens?: string;
24
+ referenceAtoks?: string;
25
+ referenceDecoderDtoks?: string;
26
+ referenceText?: string;
27
+ signedPreviewReferenceUri?: Hume.empathicVoice.ReturnSignedUri;
28
+ signedCloneReferenceUri?: Hume.empathicVoice.ReturnSignedUri;
29
+ imageUri?: string;
30
+ disabled?: boolean;
31
+ }
@@ -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 });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * An octave shared voice specification returned from the server
7
+ */
8
+ export interface ReturnVoiceOctaveShared {
9
+ id?: string;
10
+ version?: number;
11
+ name?: string;
12
+ description?: string;
13
+ referenceSignedUri?: Hume.empathicVoice.ReturnSignedUri;
14
+ imageUri?: string;
15
+ }
@@ -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 });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * An voice specification posted to the server
7
+ */
8
+ export type ReturnVoiceSpec = Hume.empathicVoice.ReturnVoiceSpecEvi2 | Hume.empathicVoice.ReturnVoiceSpecOctavecustom | Hume.empathicVoice.ReturnVoiceSpecOctaveshared;
@@ -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 });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Hume from "../../../index";
5
+ /**
6
+ * A specific voice specification for use with EVI 1 or 2
7
+ */
8
+ export interface ReturnVoiceSpecEvi2 {
9
+ /** The provider of the voice to use. Based on the enum VoiceProvider. */
10
+ provider: string;
11
+ /** String with the name of the voice to use. Maximum length of 75 characters. Will be converted to all-uppercase. */
12
+ name?: string;
13
+ customVoice: Hume.empathicVoice.ReturnCustomVoice;
14
+ }