hume 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +39 -36
  2. package/.mock/definition/empathic-voice/chat.yml +18 -3
  3. package/.mock/definition/empathic-voice/chatGroups.yml +14 -10
  4. package/.mock/definition/empathic-voice/chatWebhooks.yml +2 -0
  5. package/.mock/definition/empathic-voice/chats.yml +2 -0
  6. package/.mock/definition/empathic-voice/configs.yml +4 -0
  7. package/.mock/definition/empathic-voice/customVoices.yml +1 -0
  8. package/.mock/definition/empathic-voice/prompts.yml +2 -0
  9. package/.mock/definition/empathic-voice/tools.yml +2 -0
  10. package/.mock/definition/expression-measurement/batch/__package__.yml +10 -10
  11. package/.mock/definition/expression-measurement/stream/stream.yml +1 -1
  12. package/.mock/definition/tts/__package__.yml +98 -55
  13. package/.mock/definition/tts/voices.yml +20 -9
  14. package/.mock/fern.config.json +1 -1
  15. package/Client.d.ts +11 -7
  16. package/Client.js +54 -6
  17. package/api/resources/empathicVoice/errors/BadRequestError.d.ts +2 -1
  18. package/api/resources/empathicVoice/errors/BadRequestError.js +2 -1
  19. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +4 -2
  20. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +76 -42
  21. package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +4 -4
  22. package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +2 -1
  23. package/api/resources/empathicVoice/resources/chats/client/Client.js +57 -32
  24. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +14 -7
  25. package/api/resources/empathicVoice/resources/configs/client/Client.js +136 -66
  26. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  27. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +1 -0
  28. package/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +10 -5
  29. package/api/resources/empathicVoice/resources/customVoices/client/Client.js +89 -42
  30. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +16 -8
  31. package/api/resources/empathicVoice/resources/prompts/client/Client.js +134 -63
  32. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +14 -7
  33. package/api/resources/empathicVoice/resources/tools/client/Client.js +136 -66
  34. package/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  35. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  36. package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  37. package/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +12 -0
  38. package/api/resources/empathicVoice/types/ReturnConfig.d.ts +1 -0
  39. package/api/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +12 -0
  40. package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -1
  41. package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +2 -2
  42. package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -3
  43. package/api/resources/empathicVoice/types/UserInput.d.ts +1 -1
  44. package/api/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  45. package/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +2 -1
  46. package/api/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  47. package/api/resources/empathicVoice/types/index.d.ts +2 -4
  48. package/api/resources/empathicVoice/types/index.js +2 -4
  49. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +12 -6
  50. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +89 -38
  51. package/api/resources/tts/client/Client.d.ts +28 -22
  52. package/api/resources/tts/client/Client.js +88 -50
  53. package/api/resources/tts/client/index.d.ts +1 -1
  54. package/api/resources/tts/client/index.js +15 -0
  55. package/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +36 -0
  56. package/api/resources/tts/client/requests/index.d.ts +1 -0
  57. package/api/resources/tts/client/requests/index.js +2 -0
  58. package/api/resources/tts/errors/BadRequestError.d.ts +2 -1
  59. package/api/resources/tts/errors/BadRequestError.js +2 -1
  60. package/api/resources/tts/errors/UnprocessableEntityError.d.ts +2 -1
  61. package/api/resources/tts/errors/UnprocessableEntityError.js +2 -1
  62. package/api/resources/tts/resources/voices/client/Client.d.ts +9 -5
  63. package/api/resources/tts/resources/voices/client/Client.js +51 -26
  64. package/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +4 -1
  65. package/api/resources/tts/types/PostedTts.d.ts +6 -6
  66. package/api/resources/tts/types/PostedUtterance.d.ts +5 -5
  67. package/api/resources/tts/types/PostedUtteranceVoiceWithId.d.ts +6 -7
  68. package/api/resources/tts/types/PostedUtteranceVoiceWithName.d.ts +6 -7
  69. package/api/resources/tts/types/ReturnGeneration.d.ts +1 -1
  70. package/api/resources/tts/types/ReturnTts.d.ts +1 -1
  71. package/api/resources/tts/types/ReturnVoice.d.ts +2 -8
  72. package/api/resources/tts/types/Snippet.d.ts +2 -0
  73. package/api/resources/tts/types/SnippetAudioChunk.d.ts +2 -0
  74. package/core/fetcher/APIResponse.d.ts +10 -0
  75. package/core/fetcher/Fetcher.js +7 -0
  76. package/core/fetcher/Headers.d.ts +2 -0
  77. package/core/fetcher/Headers.js +84 -0
  78. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  79. package/core/fetcher/HttpResponsePromise.js +103 -0
  80. package/core/fetcher/RawResponse.d.ts +29 -0
  81. package/core/fetcher/RawResponse.js +44 -0
  82. package/core/fetcher/index.d.ts +3 -0
  83. package/core/fetcher/index.js +7 -1
  84. package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  85. package/core/form-data-utils/FormDataWrapper.js +48 -9
  86. package/core/pagination/Page.d.ts +5 -2
  87. package/core/pagination/Page.js +5 -2
  88. package/core/pagination/Pageable.d.ts +2 -0
  89. package/dist/Client.d.ts +11 -7
  90. package/dist/Client.js +54 -6
  91. package/dist/api/resources/empathicVoice/errors/BadRequestError.d.ts +2 -1
  92. package/dist/api/resources/empathicVoice/errors/BadRequestError.js +2 -1
  93. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +4 -2
  94. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +76 -42
  95. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +4 -4
  96. package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +2 -1
  97. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +57 -32
  98. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +14 -7
  99. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +136 -66
  100. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  101. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +1 -0
  102. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +10 -5
  103. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +89 -42
  104. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +16 -8
  105. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +134 -63
  106. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +14 -7
  107. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +136 -66
  108. package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  109. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  110. package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  111. package/dist/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +12 -0
  112. package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +1 -0
  113. package/dist/api/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +12 -0
  114. package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -1
  115. package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +2 -2
  116. package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -3
  117. package/dist/api/resources/empathicVoice/types/UserInput.d.ts +1 -1
  118. package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  119. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +2 -1
  120. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  121. package/dist/api/resources/empathicVoice/types/index.d.ts +2 -4
  122. package/dist/api/resources/empathicVoice/types/index.js +2 -4
  123. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +12 -6
  124. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +89 -38
  125. package/dist/api/resources/tts/client/Client.d.ts +28 -22
  126. package/dist/api/resources/tts/client/Client.js +88 -50
  127. package/dist/api/resources/tts/client/index.d.ts +1 -1
  128. package/dist/api/resources/tts/client/index.js +15 -0
  129. package/dist/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +36 -0
  130. package/dist/api/resources/tts/client/requests/index.d.ts +1 -0
  131. package/dist/api/resources/tts/client/requests/index.js +2 -0
  132. package/dist/api/resources/tts/errors/BadRequestError.d.ts +2 -1
  133. package/dist/api/resources/tts/errors/BadRequestError.js +2 -1
  134. package/dist/api/resources/tts/errors/UnprocessableEntityError.d.ts +2 -1
  135. package/dist/api/resources/tts/errors/UnprocessableEntityError.js +2 -1
  136. package/dist/api/resources/tts/resources/voices/client/Client.d.ts +9 -5
  137. package/dist/api/resources/tts/resources/voices/client/Client.js +51 -26
  138. package/dist/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +4 -1
  139. package/dist/api/resources/tts/types/PostedTts.d.ts +6 -6
  140. package/dist/api/resources/tts/types/PostedUtterance.d.ts +5 -5
  141. package/dist/api/resources/tts/types/PostedUtteranceVoiceWithId.d.ts +6 -7
  142. package/dist/api/resources/tts/types/PostedUtteranceVoiceWithName.d.ts +6 -7
  143. package/dist/api/resources/tts/types/ReturnGeneration.d.ts +1 -1
  144. package/dist/api/resources/tts/types/ReturnTts.d.ts +1 -1
  145. package/dist/api/resources/tts/types/ReturnVoice.d.ts +2 -8
  146. package/dist/api/resources/tts/types/Snippet.d.ts +2 -0
  147. package/dist/api/resources/tts/types/SnippetAudioChunk.d.ts +2 -0
  148. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  149. package/dist/core/fetcher/Fetcher.js +7 -0
  150. package/dist/core/fetcher/Headers.d.ts +2 -0
  151. package/dist/core/fetcher/Headers.js +84 -0
  152. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  153. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  154. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  155. package/dist/core/fetcher/RawResponse.js +44 -0
  156. package/dist/core/fetcher/index.d.ts +3 -0
  157. package/dist/core/fetcher/index.js +7 -1
  158. package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  159. package/dist/core/form-data-utils/FormDataWrapper.js +48 -9
  160. package/dist/core/pagination/Page.d.ts +5 -2
  161. package/dist/core/pagination/Page.js +5 -2
  162. package/dist/core/pagination/Pageable.d.ts +2 -0
  163. package/dist/errors/HumeError.d.ts +7 -2
  164. package/dist/errors/HumeError.js +10 -10
  165. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -0
  166. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -0
  167. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -0
  168. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -0
  169. package/dist/serialization/resources/empathicVoice/types/PostedNudgeSpec.d.ts +13 -0
  170. package/dist/serialization/resources/empathicVoice/types/{TextInput.js → PostedNudgeSpec.js} +4 -3
  171. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -0
  172. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -0
  173. package/dist/serialization/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +13 -0
  174. package/dist/serialization/resources/empathicVoice/types/{FunctionCallResponseInput.js → ReturnNudgeSpec.js} +4 -3
  175. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +1 -1
  176. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  177. package/dist/serialization/resources/empathicVoice/types/index.d.ts +2 -4
  178. package/dist/serialization/resources/empathicVoice/types/index.js +2 -4
  179. package/dist/serialization/resources/tts/types/Snippet.d.ts +1 -0
  180. package/dist/serialization/resources/tts/types/Snippet.js +1 -0
  181. package/dist/serialization/resources/tts/types/SnippetAudioChunk.d.ts +1 -0
  182. package/dist/serialization/resources/tts/types/SnippetAudioChunk.js +1 -0
  183. package/dist/version.d.ts +1 -1
  184. package/dist/version.js +1 -1
  185. package/dist/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +2 -0
  186. package/dist/wrapper/expressionMeasurement/batch/BatchClient.d.ts +2 -1
  187. package/dist/wrapper/expressionMeasurement/batch/BatchClient.js +43 -17
  188. package/errors/HumeError.d.ts +7 -2
  189. package/errors/HumeError.js +10 -10
  190. package/package.json +3 -2
  191. package/reference.md +26 -22
  192. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -0
  193. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -0
  194. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -0
  195. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -0
  196. package/serialization/resources/empathicVoice/types/PostedNudgeSpec.d.ts +13 -0
  197. package/{dist/serialization/resources/empathicVoice/types/TtsInput.js → serialization/resources/empathicVoice/types/PostedNudgeSpec.js} +4 -3
  198. package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -0
  199. package/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -0
  200. package/serialization/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +13 -0
  201. package/{dist/serialization/resources/empathicVoice/types/PostedPromptSpec.js → serialization/resources/empathicVoice/types/ReturnNudgeSpec.js} +4 -3
  202. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +1 -1
  203. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  204. package/serialization/resources/empathicVoice/types/index.d.ts +2 -4
  205. package/serialization/resources/empathicVoice/types/index.js +2 -4
  206. package/serialization/resources/tts/types/Snippet.d.ts +1 -0
  207. package/serialization/resources/tts/types/Snippet.js +1 -0
  208. package/serialization/resources/tts/types/SnippetAudioChunk.d.ts +1 -0
  209. package/serialization/resources/tts/types/SnippetAudioChunk.js +1 -0
  210. package/version.d.ts +1 -1
  211. package/version.js +1 -1
  212. package/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +2 -0
  213. package/wrapper/expressionMeasurement/batch/BatchClient.d.ts +2 -1
  214. package/wrapper/expressionMeasurement/batch/BatchClient.js +43 -17
  215. package/api/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -6
  216. package/api/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -9
  217. package/api/resources/empathicVoice/types/TextInput.d.ts +0 -6
  218. package/api/resources/empathicVoice/types/TtsInput.d.ts +0 -6
  219. package/dist/api/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -6
  220. package/dist/api/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -9
  221. package/dist/api/resources/empathicVoice/types/TextInput.d.ts +0 -6
  222. package/dist/api/resources/empathicVoice/types/TextInput.js +0 -5
  223. package/dist/api/resources/empathicVoice/types/TtsInput.d.ts +0 -6
  224. package/dist/api/resources/empathicVoice/types/TtsInput.js +0 -5
  225. package/dist/serialization/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -12
  226. package/dist/serialization/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -12
  227. package/dist/serialization/resources/empathicVoice/types/TextInput.d.ts +0 -12
  228. package/dist/serialization/resources/empathicVoice/types/TtsInput.d.ts +0 -12
  229. package/serialization/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -12
  230. package/serialization/resources/empathicVoice/types/FunctionCallResponseInput.js +0 -43
  231. package/serialization/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -12
  232. package/serialization/resources/empathicVoice/types/PostedPromptSpec.js +0 -43
  233. package/serialization/resources/empathicVoice/types/TextInput.d.ts +0 -12
  234. package/serialization/resources/empathicVoice/types/TextInput.js +0 -43
  235. package/serialization/resources/empathicVoice/types/TtsInput.d.ts +0 -12
  236. package/serialization/resources/empathicVoice/types/TtsInput.js +0 -43
  237. /package/api/resources/empathicVoice/types/{FunctionCallResponseInput.js → PostedNudgeSpec.js} +0 -0
  238. /package/api/resources/empathicVoice/types/{PostedPromptSpec.js → ReturnNudgeSpec.js} +0 -0
  239. /package/api/resources/{empathicVoice/types/TextInput.js → tts/client/requests/SynthesizeJsonRequest.js} +0 -0
  240. /package/{api/resources/empathicVoice/types/TtsInput.js → dist/api/resources/empathicVoice/types/PostedNudgeSpec.js} +0 -0
  241. /package/dist/api/resources/empathicVoice/types/{FunctionCallResponseInput.js → ReturnNudgeSpec.js} +0 -0
  242. /package/dist/api/resources/{empathicVoice/types/PostedPromptSpec.js → tts/client/requests/SynthesizeJsonRequest.js} +0 -0
@@ -21,9 +21,9 @@ service:
21
21
  auth: true
22
22
  docs: >-
23
23
  Synthesizes one or more input texts into speech using the specified
24
- voice. If no voice is provided, a novel voice will be generated
24
+ voice. If no voice is provided, a novel voice will be generated
25
25
  dynamically. Optionally, additional context can be included to influence
26
- the speech's style and prosody.
26
+ the speech's style and prosody.
27
27
 
28
28
 
29
29
  The response includes the base64-encoded audio and metadata in JSON
@@ -34,6 +34,23 @@ service:
34
34
  request:
35
35
  body:
36
36
  type: PostedTts
37
+ query-parameters:
38
+ access_token:
39
+ type: optional<string>
40
+ default: ''
41
+ docs: >-
42
+ Access token used for authenticating the client. If not provided,
43
+ an `api_key` must be provided to authenticate.
44
+
45
+
46
+ The access token is generated using both an API key and a Secret
47
+ key, which provides an additional layer of security compared to
48
+ using just an API key.
49
+
50
+
51
+ For more details, refer to the [Authentication Strategies
52
+ Guide](/docs/introduction/api-key#authentication-strategies).
53
+ name: SynthesizeJsonRequest
37
54
  content-type: application/json
38
55
  response:
39
56
  docs: Successful Response
@@ -49,14 +66,14 @@ service:
49
66
  the mind which contemplates them.
50
67
  description: >-
51
68
  Middle-aged masculine voice with a clear, rhythmic Scots lilt,
52
- rounded vowels, and a warm, steady tone with an articulate,
69
+ rounded vowels, and a warm, steady tone with an articulate,
53
70
  academic quality.
54
71
  context:
55
72
  utterances:
56
73
  - text: How can people see beauty so differently?
57
74
  description: >-
58
75
  A curious student with a clear and respectful tone, seeking
59
- clarification on Hume's ideas with a straightforward
76
+ clarification on Hume's ideas with a straightforward
60
77
  question.
61
78
  format:
62
79
  type: mp3
@@ -86,9 +103,9 @@ service:
86
103
  auth: true
87
104
  docs: >-
88
105
  Synthesizes one or more input texts into speech using the specified
89
- voice. If no voice is provided, a novel voice will be generated
106
+ voice. If no voice is provided, a novel voice will be generated
90
107
  dynamically. Optionally, additional context can be included to influence
91
- the speech's style and prosody.
108
+ the speech's style and prosody.
92
109
 
93
110
 
94
111
  The response contains the generated audio file in the requested format.
@@ -113,7 +130,7 @@ service:
113
130
  the mind which contemplates them.
114
131
  description: >-
115
132
  Middle-aged masculine voice with a clear, rhythmic Scots lilt,
116
- rounded vowels, and a warm, steady tone with an articulate,
133
+ rounded vowels, and a warm, steady tone with an articulate,
117
134
  academic quality.
118
135
  context:
119
136
  generation_id: 09ad914d-8e7f-40f8-a279-e34f07f7dab2
@@ -126,7 +143,7 @@ service:
126
143
  auth: true
127
144
  docs: >-
128
145
  Streams synthesized speech using the specified voice. If no voice is
129
- provided, a novel voice will be generated dynamically. Optionally,
146
+ provided, a novel voice will be generated dynamically. Optionally,
130
147
  additional context can be included to influence the speech's style and
131
148
  prosody.
132
149
  source:
@@ -150,7 +167,7 @@ service:
150
167
  the mind which contemplates them.
151
168
  description: >-
152
169
  Middle-aged masculine voice with a clear, rhythmic Scots lilt,
153
- rounded vowels, and a warm, steady tone with an articulate,
170
+ rounded vowels, and a warm, steady tone with an articulate,
154
171
  academic quality.
155
172
  context:
156
173
  generation_id: 09ad914d-8e7f-40f8-a279-e34f07f7dab2
@@ -163,8 +180,8 @@ service:
163
180
  auth: true
164
181
  docs: >-
165
182
  Streams synthesized speech using the specified voice. If no voice is
166
- provided, a novel voice will be generated dynamically. Optionally,
167
- additional context can be included to influence the speech's style and
183
+ provided, a novel voice will be generated dynamically. Optionally,
184
+ additional context can be included to influence the speech's style and
168
185
  prosody.
169
186
 
170
187
 
@@ -191,14 +208,14 @@ service:
191
208
  the mind which contemplates them.
192
209
  description: >-
193
210
  Middle-aged masculine voice with a clear, rhythmic Scots lilt,
194
- rounded vowels, and a warm, steady tone with an articulate,
211
+ rounded vowels, and a warm, steady tone with an articulate,
195
212
  academic quality.
196
213
  context:
197
214
  utterances:
198
215
  - text: How can people see beauty so differently?
199
216
  description: >-
200
217
  A curious student with a clear and respectful tone, seeking
201
- clarification on Hume's ideas with a straightforward
218
+ clarification on Hume's ideas with a straightforward
202
219
  question.
203
220
  format:
204
221
  type: mp3
@@ -267,7 +284,7 @@ types:
267
284
  snippets:
268
285
  docs: >-
269
286
  A list of snippet groups where each group corresponds to an utterance
270
- in the request. Each group contains segmented snippets that represent
287
+ in the request. Each group contains segmented snippets that represent
271
288
  the original utterance divided into more natural-sounding units
272
289
  optimized for speech delivery.
273
290
  type: list<list<Snippet>>
@@ -332,19 +349,19 @@ types:
332
349
  Controls how audio output is segmented in the response.
333
350
 
334
351
 
335
- - When **enabled** (`true`), input utterances are automatically split
352
+ - When **enabled** (`true`), input utterances are automatically split
336
353
  into natural-sounding speech segments.
337
354
 
338
355
 
339
- - When **disabled** (`false`), the response maintains a strict
356
+ - When **disabled** (`false`), the response maintains a strict
340
357
  one-to-one mapping between input utterances and output snippets.
341
358
 
342
359
 
343
360
  This setting affects how the `snippets` array is structured in the
344
- response, which may be important for applications that need to track
345
- the relationship between input text and generated audio segments.
346
- When setting to `false`, avoid including utterances with long `text`,
347
- as this can result in distorted output.
361
+ response, which may be important for applications that need to track
362
+ the relationship between input text and generated audio segments. When
363
+ setting to `false`, avoid including utterances with long `text`, as
364
+ this can result in distorted output.
348
365
  default: true
349
366
  strip_headers:
350
367
  type: optional<boolean>
@@ -359,9 +376,9 @@ types:
359
376
  A list of **Utterances** to be converted to speech output.
360
377
 
361
378
 
362
- An **Utterance** is a unit of input for
379
+ An **Utterance** is a unit of input for
363
380
  [Octave](/docs/text-to-speech-tts/overview), and includes input
364
- `text`, an optional `description` to serve as the prompt for how the
381
+ `text`, an optional `description` to serve as the prompt for how the
365
382
  speech should be delivered, an optional `voice` specification, and
366
383
  additional controls to guide delivery for `speed` and
367
384
  `trailing_silence`.
@@ -376,11 +393,11 @@ types:
376
393
  mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode).
377
394
 
378
395
  - Dynamic voice generation is not supported with this mode; a
379
- predefined
380
- [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice)
396
+ predefined
397
+ [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice)
381
398
  must be specified in your request.
382
399
 
383
- - This mode is only supported for streaming endpoints (e.g.,
400
+ - This mode is only supported for streaming endpoints (e.g.,
384
401
  [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming),
385
402
  [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)).
386
403
 
@@ -401,7 +418,7 @@ types:
401
418
  type: optional<string>
402
419
  docs: >-
403
420
  A unique ID associated with this request for tracking and
404
- troubleshooting. Use this ID when contacting [support](/support) for
421
+ troubleshooting. Use this ID when contacting [support](/support) for
405
422
  troubleshooting assistance.
406
423
  source:
407
424
  openapi: tts-openapi.yml
@@ -416,16 +433,12 @@ types:
416
433
  docs: Name of the voice in the `Voice Library`.
417
434
  provider:
418
435
  type: optional<VoiceProvider>
419
- docs: |-
420
- Specifies the provider of the voice.
421
-
422
- - **HUME_AI**: Preset voices generated by Hume.
423
-
424
- - **CUSTOM_VOICE**: Voices you have generated and saved to your `Voice library`.
436
+ docs: >-
437
+ The provider associated with the created voice.
425
438
 
426
- If a provider is not specified, the provider will default to `CUSTOM_VOICE`.
427
439
 
428
- While Hume's preset voices are shared and usable by anyone, your custom voices are only available to calls made with your API key.
440
+ Voices created through this endpoint will always have the provider set
441
+ to `CUSTOM_VOICE`, indicating a custom voice stored in your account.
429
442
  source:
430
443
  openapi: tts-openapi.yml
431
444
  FormatPcm:
@@ -439,7 +452,6 @@ types:
439
452
  docs: >-
440
453
  The segmented audio output in the requested format, encoded as a
441
454
  base64 string.
442
- access: read-only
443
455
  generation_id:
444
456
  type: string
445
457
  docs: The generation ID this snippet corresponds to.
@@ -449,6 +461,11 @@ types:
449
461
  text:
450
462
  type: string
451
463
  docs: The text for this **Snippet**.
464
+ transcribed_text:
465
+ type: optional<string>
466
+ docs: >-
467
+ The transcribed text of the generated audio. It is only present if
468
+ `instant_mode` is set to `false`.
452
469
  utterance_index:
453
470
  type: optional<integer>
454
471
  docs: The index of the utterance in the request this snippet corresponds to.
@@ -478,6 +495,12 @@ types:
478
495
  text:
479
496
  type: string
480
497
  docs: The text of the parent snippet that this chunk corresponds to.
498
+ transcribed_text:
499
+ type: optional<string>
500
+ docs: >-
501
+ The transcribed text of the generated audio of the parent snippet that
502
+ this chunk corresponds to. It is only present if `instant_mode` is set
503
+ to `false`.
481
504
  utterance_index:
482
505
  type: optional<integer>
483
506
  docs: >-
@@ -491,15 +514,15 @@ types:
491
514
  type: optional<string>
492
515
  docs: >-
493
516
  Natural language instructions describing how the synthesized speech
494
- should sound, including but not limited to tone, intonation, pacing,
495
- and accent (e.g., 'a soft, gentle voice with a strong British
517
+ should sound, including but not limited to tone, intonation, pacing,
518
+ and accent (e.g., 'a soft, gentle voice with a strong British
496
519
  accent').
497
520
 
498
521
  - If a Voice is specified in the request, this description serves as
499
- acting instructions. For tips on how to effectively guide speech
522
+ acting instructions. For tips on how to effectively guide speech
500
523
  delivery, see our guide on [Acting
501
524
  instructions](/docs/text-to-speech-tts/acting-instructions).
502
- - 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.
525
+ - 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.
503
526
  validation:
504
527
  maxLength: 1000
505
528
  speed:
@@ -525,10 +548,10 @@ types:
525
548
  type: optional<PostedUtteranceVoice>
526
549
  docs: >-
527
550
  The `name` or `id` associated with a **Voice** from the **Voice
528
- Library** to be used as the speaker for this and all subsequent
551
+ Library** to be used as the speaker for this and all subsequent
529
552
  `utterances`, until the `voice` field is updated again.
530
553
 
531
- See our [voices guide](/docs/text-to-speech-tts/voices) for more details on generating and specifying **Voices**.
554
+ See our [voices guide](/docs/text-to-speech-tts/voices) for more details on generating and specifying **Voices**.
532
555
  source:
533
556
  openapi: tts-openapi.yml
534
557
  ValidationErrorLocItem:
@@ -551,38 +574,58 @@ types:
551
574
  properties:
552
575
  id:
553
576
  type: string
554
- docs: The ID of a **Voice** within the **Voice Library**.
577
+ docs: The unique ID associated with the **Voice**.
555
578
  provider:
556
579
  type: optional<VoiceProvider>
557
- docs: |-
558
- Specifies the provider of the voice associated with this voice ID.
580
+ docs: >-
581
+ Specifies the source provider associated with the chosen voice.
582
+
583
+
584
+ - **`HUME_AI`**: Select voices from Hume's [Voice
585
+ Library](https://platform.hume.ai/tts/voice-library), containing a
586
+ variety of preset, shared voices.
559
587
 
560
- - **HUME_AI**: Preset voices generated by Hume.
588
+ - **`CUSTOM_VOICE`**: Select from voices you've personally generated
589
+ and saved in your account.
561
590
 
562
- - **CUSTOM_VOICE**: Voices you have generated and saved to your `Voice library`.
563
591
 
564
- If a provider is not specified, the provider will default to `CUSTOM_VOICE`.
592
+ If no provider is explicitly set, the default provider is
593
+ `CUSTOM_VOICE`. When using voices from Hume's **Voice Library**, you
594
+ must explicitly set the provider to `HUME_AI`.
565
595
 
566
- While Hume's preset voices are shared and usable by anyone, your custom voices are only available to calls made with your API key.
596
+
597
+ Preset voices from Hume's **Voice Library** are accessible by all
598
+ users. In contrast, your custom voices are private and accessible only
599
+ via requests authenticated with your API key.
567
600
  source:
568
601
  openapi: tts-openapi.yml
569
602
  PostedUtteranceVoiceWithName:
570
603
  properties:
571
604
  name:
572
605
  type: string
573
- docs: The name of a **Voice** within the **Voice Library**.
606
+ docs: The name of a **Voice**.
574
607
  provider:
575
608
  type: optional<VoiceProvider>
576
- docs: |-
577
- Specifies the provider of the voice associated with this voice name.
609
+ docs: >-
610
+ Specifies the source provider associated with the chosen voice.
611
+
612
+
613
+ - **`HUME_AI`**: Select voices from Hume's [Voice
614
+ Library](https://platform.hume.ai/tts/voice-library), containing a
615
+ variety of preset, shared voices.
616
+
617
+ - **`CUSTOM_VOICE`**: Select from voices you've personally generated
618
+ and saved in your account.
578
619
 
579
- - **HUME_AI**: Preset voices generated by Hume.
580
620
 
581
- - **CUSTOM_VOICE**: Voices you have generated and saved to your `Voice library`.
621
+ If no provider is explicitly set, the default provider is
622
+ `CUSTOM_VOICE`. When using voices from Hume's **Voice Library**, you
623
+ must explicitly set the provider to `HUME_AI`.
582
624
 
583
- If a provider is not specified, the provider will default to `CUSTOM_VOICE`.
584
625
 
585
- While Hume's preset voices are shared and usable by anyone, your custom voices are only available to calls made with your API key.
626
+ Preset voices from Hume's **Voice Library** are accessible by all
627
+ users. In contrast, your custom voices are private and accessible only
628
+ via requests authenticated with your API key.
586
629
  source:
587
630
  openapi: tts-openapi.yml
588
631
  VoiceProvider:
@@ -9,9 +9,8 @@ service:
9
9
  method: GET
10
10
  auth: true
11
11
  docs: >-
12
- Lists voices in your **Voice Library**. Set provider to `HUME_AI` to
13
- list Hume's preset voices, or to `CUSTOM_VOICE` to a custom voice
14
- created in your account.
12
+ Lists voices you have saved in your account, or voices from the [Voice
13
+ Library](https://platform.hume.ai/tts/voice-library).
15
14
  pagination:
16
15
  offset: $request.page_number
17
16
  results: $response.voices_page
@@ -24,10 +23,18 @@ service:
24
23
  provider:
25
24
  type: root.VoiceProvider
26
25
  docs: >-
27
- Specifies whether to return custom voices created in your account
28
- or shared voices provided by Hume
26
+ Specify the voice provider to filter voices returned by the
27
+ endpoint:
28
+
29
+
30
+ - **`HUME_AI`**: Lists preset, shared voices from Hume's [Voice
31
+ Library](https://platform.hume.ai/tts/voice-library).
32
+
33
+ - **`CUSTOM_VOICE`**: Lists custom voices created and saved to
34
+ your account.
29
35
  page_number:
30
36
  type: optional<integer>
37
+ default: 0
31
38
  docs: >-
32
39
  Specifies the page number to retrieve, enabling pagination.
33
40
 
@@ -74,9 +81,13 @@ service:
74
81
  method: POST
75
82
  auth: true
76
83
  docs: >-
77
- Creates a new voice from a specified TTS generation ID and saves it to
78
- your **Voice Library**. This allows for consistent speech style and
79
- prosody across multiple requests.
84
+ Saves a new custom voice to your account using the specified TTS
85
+ generation ID.
86
+
87
+
88
+ Once saved, this voice can be reused in subsequent TTS requests,
89
+ ensuring consistent speech style and prosody. For more details on voice
90
+ creation, see the [Voices Guide](/docs/text-to-speech-tts/voices).
80
91
  source:
81
92
  openapi: tts-openapi.yml
82
93
  display-name: Create voice
@@ -113,7 +124,7 @@ service:
113
124
  path: /v0/tts/voices
114
125
  method: DELETE
115
126
  auth: true
116
- docs: Removes a custom voice from your **Voice Library**.
127
+ docs: Deletes a previously generated custom voice.
117
128
  source:
118
129
  openapi: tts-openapi.yml
119
130
  display-name: Delete voice
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "organization" : "hume",
3
- "version" : "0.57.5"
3
+ "version" : "0.64.10"
4
4
  }
package/Client.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  /** THIS FILE IS MANUALLY MAINAINED: see .fernignore */
2
2
  import * as environments from "./environments";
3
3
  import * as core from "./core";
4
- import { ExpressionMeasurement } from "./api/resources/expressionMeasurement/client/Client";
5
- import { EmpathicVoice } from "./api/resources/empathicVoice/client/Client";
6
4
  import { Tts } from "./api/resources/tts/client/Client";
5
+ import { EmpathicVoice } from "./api/resources/empathicVoice/client/Client";
6
+ import { ExpressionMeasurement } from "./api/resources/expressionMeasurement/client/Client";
7
7
  export declare namespace HumeClient {
8
8
  interface Options {
9
9
  environment?: core.Supplier<environments.HumeEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
10
12
  apiKey?: core.Supplier<string | undefined>;
11
13
  accessToken?: core.Supplier<string | undefined>;
12
14
  fetcher?: core.FetchFunction;
@@ -18,15 +20,17 @@ export declare namespace HumeClient {
18
20
  maxRetries?: number;
19
21
  /** A hook to abort the request. */
20
22
  abortSignal?: AbortSignal;
23
+ /** Additional headers to include in the request. */
24
+ headers?: Record<string, string>;
21
25
  }
22
26
  }
23
27
  export declare class HumeClient {
24
28
  protected readonly _options: HumeClient.Options;
25
- constructor(_options?: HumeClient.Options);
26
- protected _expressionMeasurement: ExpressionMeasurement | undefined;
27
- get expressionMeasurement(): ExpressionMeasurement;
28
- protected _empathicVoice: EmpathicVoice | undefined;
29
- get empathicVoice(): EmpathicVoice;
30
29
  protected _tts: Tts | undefined;
30
+ protected _empathicVoice: EmpathicVoice | undefined;
31
+ protected _expressionMeasurement: ExpressionMeasurement | undefined;
32
+ constructor(_options?: HumeClient.Options);
31
33
  get tts(): Tts;
34
+ get empathicVoice(): EmpathicVoice;
35
+ get expressionMeasurement(): ExpressionMeasurement;
32
36
  }
package/Client.js CHANGED
@@ -1,25 +1,73 @@
1
1
  "use strict";
2
2
  /** THIS FILE IS MANUALLY MAINAINED: see .fernignore */
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
3
36
  Object.defineProperty(exports, "__esModule", { value: true });
4
37
  exports.HumeClient = void 0;
5
- const Client_1 = require("./api/resources/expressionMeasurement/client/Client");
38
+ const core = __importStar(require("./core"));
39
+ const Client_1 = require("./api/resources/tts/client/Client");
6
40
  const Client_2 = require("./api/resources/empathicVoice/client/Client");
7
- const Client_3 = require("./api/resources/tts/client/Client");
41
+ const Client_3 = require("./api/resources/expressionMeasurement/client/Client");
42
+ const version_1 = require("./version");
43
+ const fetcherThatAddsHeaders = (fetcherToWrap) => {
44
+ return (args) => {
45
+ var _a;
46
+ const newArgs = Object.assign({}, args);
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);
50
+ return fetcherToWrap(args);
51
+ };
52
+ };
8
53
  class HumeClient {
9
54
  constructor(_options = {}) {
55
+ var _a;
10
56
  this._options = _options;
57
+ const defaultFetcher = (_a = _options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher;
58
+ this._options.fetcher = fetcherThatAddsHeaders(defaultFetcher);
11
59
  }
12
- get expressionMeasurement() {
60
+ get tts() {
13
61
  var _a;
14
- return ((_a = this._expressionMeasurement) !== null && _a !== void 0 ? _a : (this._expressionMeasurement = new Client_1.ExpressionMeasurement(this._options)));
62
+ return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_1.Tts(this._options)));
15
63
  }
16
64
  get empathicVoice() {
17
65
  var _a;
18
66
  return ((_a = this._empathicVoice) !== null && _a !== void 0 ? _a : (this._empathicVoice = new Client_2.EmpathicVoice(this._options)));
19
67
  }
20
- get tts() {
68
+ get expressionMeasurement() {
21
69
  var _a;
22
- return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_3.Tts(this._options)));
70
+ return ((_a = this._expressionMeasurement) !== null && _a !== void 0 ? _a : (this._expressionMeasurement = new Client_3.ExpressionMeasurement(this._options)));
23
71
  }
24
72
  }
25
73
  exports.HumeClient = HumeClient;
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as errors from "../../../../errors/index";
5
5
  import * as Hume from "../../../index";
6
+ import * as core from "../../../../core";
6
7
  export declare class BadRequestError extends errors.HumeError {
7
- constructor(body: Hume.empathicVoice.ErrorResponse);
8
+ constructor(body: Hume.empathicVoice.ErrorResponse, rawResponse?: core.RawResponse);
8
9
  }
@@ -39,11 +39,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.BadRequestError = void 0;
40
40
  const errors = __importStar(require("../../../../errors/index"));
41
41
  class BadRequestError extends errors.HumeError {
42
- constructor(body) {
42
+ constructor(body, rawResponse) {
43
43
  super({
44
44
  message: "BadRequestError",
45
45
  statusCode: 400,
46
46
  body: body,
47
+ rawResponse: rawResponse,
47
48
  });
48
49
  Object.setPrototypeOf(this, BadRequestError.prototype);
49
50
  }
@@ -59,7 +59,8 @@ export declare class ChatGroups {
59
59
  * ascendingOrder: true
60
60
  * })
61
61
  */
62
- getChatGroup(id: string, request?: Hume.empathicVoice.ChatGroupsGetChatGroupRequest, requestOptions?: ChatGroups.RequestOptions): Promise<Hume.empathicVoice.ReturnChatGroupPagedChats>;
62
+ getChatGroup(id: string, request?: Hume.empathicVoice.ChatGroupsGetChatGroupRequest, requestOptions?: ChatGroups.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnChatGroupPagedChats>;
63
+ private __getChatGroup;
63
64
  /**
64
65
  * Fetches a paginated list of **Chat** events associated with a **Chat Group**.
65
66
  *
@@ -93,7 +94,8 @@ export declare class ChatGroups {
93
94
  * ascendingOrder: true
94
95
  * })
95
96
  */
96
- getAudio(id: string, request?: Hume.empathicVoice.ChatGroupsGetAudioRequest, requestOptions?: ChatGroups.RequestOptions): Promise<Hume.empathicVoice.ReturnChatGroupPagedAudioReconstructions>;
97
+ getAudio(id: string, request?: Hume.empathicVoice.ChatGroupsGetAudioRequest, requestOptions?: ChatGroups.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnChatGroupPagedAudioReconstructions>;
98
+ private __getAudio;
97
99
  protected _getCustomAuthorizationHeaders(): Promise<{
98
100
  "X-Hume-Api-Key": string | undefined;
99
101
  }>;