hume 0.12.1 → 0.13.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 (324) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +760 -711
  2. package/.mock/definition/empathic-voice/chat.yml +29 -23
  3. package/.mock/definition/empathic-voice/chatWebhooks.yml +3 -3
  4. package/.mock/definition/empathic-voice/configs.yml +10 -4
  5. package/.mock/definition/tts/__package__.yml +77 -125
  6. package/.mock/fern.config.json +1 -1
  7. package/api/resources/empathicVoice/resources/chatGroups/client/index.d.ts +1 -0
  8. package/api/resources/empathicVoice/resources/chats/client/index.d.ts +1 -0
  9. package/api/resources/empathicVoice/resources/configs/client/index.d.ts +1 -0
  10. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +5 -1
  11. package/api/resources/empathicVoice/resources/prompts/client/index.d.ts +1 -0
  12. package/api/resources/empathicVoice/resources/tools/client/index.d.ts +1 -0
  13. package/api/resources/empathicVoice/types/AssistantEnd.d.ts +2 -2
  14. package/api/resources/empathicVoice/types/AssistantInput.d.ts +2 -2
  15. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +8 -8
  16. package/api/resources/empathicVoice/types/AssistantProsody.d.ts +6 -6
  17. package/api/resources/empathicVoice/types/AudioConfiguration.d.ts +2 -2
  18. package/api/resources/empathicVoice/types/AudioInput.d.ts +6 -6
  19. package/api/resources/empathicVoice/types/AudioOutput.d.ts +4 -4
  20. package/api/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
  21. package/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -2
  22. package/api/resources/empathicVoice/types/ChatMetadata.d.ts +8 -8
  23. package/api/resources/empathicVoice/types/Context.d.ts +8 -14
  24. package/api/resources/empathicVoice/types/ContextType.d.ts +2 -3
  25. package/api/resources/empathicVoice/types/ContextType.js +1 -2
  26. package/api/resources/empathicVoice/types/LanguageModelType.d.ts +20 -1
  27. package/api/resources/empathicVoice/types/LanguageModelType.js +19 -0
  28. package/api/resources/empathicVoice/types/ModelProviderEnum.d.ts +4 -1
  29. package/api/resources/empathicVoice/types/ModelProviderEnum.js +3 -0
  30. package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +2 -2
  31. package/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +2 -2
  32. package/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +12 -17
  33. package/api/resources/empathicVoice/types/ReturnChatEventRole.d.ts +0 -4
  34. package/api/resources/empathicVoice/types/ReturnChatEventType.d.ts +22 -18
  35. package/api/resources/empathicVoice/types/ReturnChatEventType.js +9 -4
  36. package/api/resources/empathicVoice/types/ReturnConfig.d.ts +18 -14
  37. package/api/resources/empathicVoice/types/ReturnPrompt.d.ts +2 -2
  38. package/api/resources/empathicVoice/types/SessionSettings.d.ts +29 -29
  39. package/api/resources/empathicVoice/types/Tool.d.ts +6 -6
  40. package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +6 -6
  41. package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +16 -16
  42. package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +8 -8
  43. package/api/resources/empathicVoice/types/UserInput.d.ts +2 -2
  44. package/api/resources/empathicVoice/types/UserInterruption.d.ts +4 -4
  45. package/api/resources/empathicVoice/types/UserMessage.d.ts +14 -7
  46. package/api/resources/empathicVoice/types/VoiceProvider.d.ts +2 -1
  47. package/api/resources/empathicVoice/types/VoiceProvider.js +1 -0
  48. package/api/resources/empathicVoice/types/WebSocketError.d.ts +10 -10
  49. package/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +8 -8
  50. package/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +6 -6
  51. package/api/resources/empathicVoice/types/index.d.ts +16 -16
  52. package/api/resources/empathicVoice/types/index.js +16 -16
  53. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +2 -4
  54. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +1 -1
  55. package/api/resources/expressionMeasurement/resources/batch/client/index.d.ts +1 -0
  56. package/api/resources/tts/client/Client.d.ts +21 -23
  57. package/api/resources/tts/client/Client.js +50 -58
  58. package/api/resources/tts/client/index.d.ts +1 -1
  59. package/api/resources/tts/client/index.js +0 -15
  60. package/api/resources/tts/resources/voices/client/index.d.ts +1 -0
  61. package/api/resources/tts/types/PostedTts.d.ts +8 -8
  62. package/api/resources/tts/types/PostedUtterance.d.ts +6 -6
  63. package/api/resources/tts/types/ReturnGeneration.d.ts +5 -5
  64. package/api/resources/tts/types/ReturnTts.d.ts +1 -1
  65. package/api/resources/tts/types/Snippet.d.ts +6 -6
  66. package/api/resources/tts/types/SnippetAudioChunk.d.ts +0 -16
  67. package/core/fetcher/BinaryResponse.d.ts +17 -0
  68. package/core/fetcher/BinaryResponse.js +14 -0
  69. package/core/fetcher/Fetcher.d.ts +1 -1
  70. package/core/fetcher/ResponseWithBody.d.ts +4 -0
  71. package/core/fetcher/ResponseWithBody.js +6 -0
  72. package/core/fetcher/getFetchFn.js +3 -3
  73. package/core/fetcher/getResponseBody.js +33 -32
  74. package/core/fetcher/index.d.ts +1 -0
  75. package/core/file.d.ts +1 -0
  76. package/core/form-data-utils/FormDataWrapper.d.ts +5 -52
  77. package/core/form-data-utils/FormDataWrapper.js +104 -124
  78. package/core/index.d.ts +1 -0
  79. package/core/index.js +1 -0
  80. package/dist/api/resources/empathicVoice/resources/chatGroups/client/index.d.ts +1 -0
  81. package/dist/api/resources/empathicVoice/resources/chats/client/index.d.ts +1 -0
  82. package/dist/api/resources/empathicVoice/resources/configs/client/index.d.ts +1 -0
  83. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +5 -1
  84. package/dist/api/resources/empathicVoice/resources/prompts/client/index.d.ts +1 -0
  85. package/dist/api/resources/empathicVoice/resources/tools/client/index.d.ts +1 -0
  86. package/dist/api/resources/empathicVoice/types/AssistantEnd.d.ts +2 -2
  87. package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +2 -2
  88. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +8 -8
  89. package/dist/api/resources/empathicVoice/types/AssistantProsody.d.ts +6 -6
  90. package/dist/api/resources/empathicVoice/types/AudioConfiguration.d.ts +2 -2
  91. package/dist/api/resources/empathicVoice/types/AudioInput.d.ts +6 -6
  92. package/dist/api/resources/empathicVoice/types/AudioOutput.d.ts +4 -4
  93. package/dist/api/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
  94. package/dist/api/resources/empathicVoice/types/ChatMessage.d.ts +2 -2
  95. package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +8 -8
  96. package/dist/api/resources/empathicVoice/types/Context.d.ts +8 -14
  97. package/dist/api/resources/empathicVoice/types/ContextType.d.ts +2 -3
  98. package/dist/api/resources/empathicVoice/types/ContextType.js +1 -2
  99. package/dist/api/resources/empathicVoice/types/LanguageModelType.d.ts +20 -1
  100. package/dist/api/resources/empathicVoice/types/LanguageModelType.js +19 -0
  101. package/dist/api/resources/empathicVoice/types/ModelProviderEnum.d.ts +4 -1
  102. package/dist/api/resources/empathicVoice/types/ModelProviderEnum.js +3 -0
  103. package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +2 -2
  104. package/dist/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +2 -2
  105. package/dist/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +12 -17
  106. package/dist/api/resources/empathicVoice/types/ReturnChatEventRole.d.ts +0 -4
  107. package/dist/api/resources/empathicVoice/types/ReturnChatEventType.d.ts +22 -18
  108. package/dist/api/resources/empathicVoice/types/ReturnChatEventType.js +9 -4
  109. package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +18 -14
  110. package/dist/api/resources/empathicVoice/types/ReturnPrompt.d.ts +2 -2
  111. package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +29 -29
  112. package/dist/api/resources/empathicVoice/types/Tool.d.ts +6 -6
  113. package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +6 -6
  114. package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +16 -16
  115. package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +8 -8
  116. package/dist/api/resources/empathicVoice/types/UserInput.d.ts +2 -2
  117. package/dist/api/resources/empathicVoice/types/UserInterruption.d.ts +4 -4
  118. package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +14 -7
  119. package/dist/api/resources/empathicVoice/types/VoiceProvider.d.ts +2 -1
  120. package/dist/api/resources/empathicVoice/types/VoiceProvider.js +1 -0
  121. package/dist/api/resources/empathicVoice/types/WebSocketError.d.ts +10 -10
  122. package/dist/api/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +8 -8
  123. package/dist/api/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +6 -6
  124. package/dist/api/resources/empathicVoice/types/index.d.ts +16 -16
  125. package/dist/api/resources/empathicVoice/types/index.js +16 -16
  126. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +2 -4
  127. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +1 -1
  128. package/dist/api/resources/expressionMeasurement/resources/batch/client/index.d.ts +1 -0
  129. package/dist/api/resources/tts/client/Client.d.ts +21 -23
  130. package/dist/api/resources/tts/client/Client.js +50 -58
  131. package/dist/api/resources/tts/client/index.d.ts +1 -1
  132. package/dist/api/resources/tts/client/index.js +0 -15
  133. package/dist/api/resources/tts/resources/voices/client/index.d.ts +1 -0
  134. package/dist/api/resources/tts/types/PostedTts.d.ts +8 -8
  135. package/dist/api/resources/tts/types/PostedUtterance.d.ts +6 -6
  136. package/dist/api/resources/tts/types/ReturnGeneration.d.ts +5 -5
  137. package/dist/api/resources/tts/types/ReturnTts.d.ts +1 -1
  138. package/dist/api/resources/tts/types/Snippet.d.ts +6 -6
  139. package/dist/api/resources/tts/types/SnippetAudioChunk.d.ts +0 -16
  140. package/dist/core/fetcher/BinaryResponse.d.ts +17 -0
  141. package/dist/core/fetcher/BinaryResponse.js +14 -0
  142. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  143. package/dist/core/fetcher/ResponseWithBody.d.ts +4 -0
  144. package/dist/core/fetcher/ResponseWithBody.js +6 -0
  145. package/dist/core/fetcher/getFetchFn.js +3 -3
  146. package/dist/core/fetcher/getResponseBody.js +33 -32
  147. package/dist/core/fetcher/index.d.ts +1 -0
  148. package/dist/core/file.d.ts +1 -0
  149. package/dist/core/form-data-utils/FormDataWrapper.d.ts +5 -52
  150. package/dist/core/form-data-utils/FormDataWrapper.js +104 -124
  151. package/dist/core/index.d.ts +1 -0
  152. package/dist/core/index.js +1 -0
  153. package/dist/serialization/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
  154. package/dist/serialization/resources/empathicVoice/types/AssistantEnd.js +1 -1
  155. package/dist/serialization/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  156. package/dist/serialization/resources/empathicVoice/types/AssistantInput.js +1 -1
  157. package/dist/serialization/resources/empathicVoice/types/AssistantMessage.d.ts +2 -2
  158. package/dist/serialization/resources/empathicVoice/types/AssistantMessage.js +2 -2
  159. package/dist/serialization/resources/empathicVoice/types/AssistantProsody.d.ts +2 -2
  160. package/dist/serialization/resources/empathicVoice/types/AssistantProsody.js +2 -2
  161. package/dist/serialization/resources/empathicVoice/types/AudioConfiguration.d.ts +1 -1
  162. package/dist/serialization/resources/empathicVoice/types/AudioConfiguration.js +1 -1
  163. package/dist/serialization/resources/empathicVoice/types/AudioInput.d.ts +1 -1
  164. package/dist/serialization/resources/empathicVoice/types/AudioInput.js +1 -1
  165. package/dist/serialization/resources/empathicVoice/types/AudioOutput.d.ts +2 -2
  166. package/dist/serialization/resources/empathicVoice/types/AudioOutput.js +2 -2
  167. package/dist/serialization/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
  168. package/dist/serialization/resources/empathicVoice/types/BuiltinToolConfig.js +1 -1
  169. package/dist/serialization/resources/empathicVoice/types/ChatMessage.d.ts +1 -1
  170. package/dist/serialization/resources/empathicVoice/types/ChatMessage.js +1 -1
  171. package/dist/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +2 -2
  172. package/dist/serialization/resources/empathicVoice/types/ChatMetadata.js +2 -2
  173. package/dist/serialization/resources/empathicVoice/types/Context.d.ts +1 -1
  174. package/dist/serialization/resources/empathicVoice/types/Context.js +1 -1
  175. package/dist/serialization/resources/empathicVoice/types/ContextType.d.ts +1 -1
  176. package/dist/serialization/resources/empathicVoice/types/ContextType.js +1 -1
  177. package/dist/serialization/resources/empathicVoice/types/LanguageModelType.d.ts +1 -1
  178. package/dist/serialization/resources/empathicVoice/types/LanguageModelType.js +19 -0
  179. package/dist/serialization/resources/empathicVoice/types/ModelProviderEnum.d.ts +1 -1
  180. package/dist/serialization/resources/empathicVoice/types/ModelProviderEnum.js +3 -0
  181. package/dist/serialization/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  182. package/dist/serialization/resources/empathicVoice/types/PauseAssistantMessage.js +1 -1
  183. package/dist/serialization/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -1
  184. package/dist/serialization/resources/empathicVoice/types/ResumeAssistantMessage.js +1 -1
  185. package/dist/serialization/resources/empathicVoice/types/ReturnChatEventType.d.ts +1 -1
  186. package/dist/serialization/resources/empathicVoice/types/ReturnChatEventType.js +9 -4
  187. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +9 -9
  188. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +9 -9
  189. package/dist/serialization/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
  190. package/dist/serialization/resources/empathicVoice/types/ReturnPrompt.js +1 -1
  191. package/dist/serialization/resources/empathicVoice/types/SessionSettings.d.ts +8 -8
  192. package/dist/serialization/resources/empathicVoice/types/SessionSettings.js +8 -8
  193. package/dist/serialization/resources/empathicVoice/types/Tool.d.ts +3 -3
  194. package/dist/serialization/resources/empathicVoice/types/Tool.js +3 -3
  195. package/dist/serialization/resources/empathicVoice/types/ToolCallMessage.d.ts +3 -3
  196. package/dist/serialization/resources/empathicVoice/types/ToolCallMessage.js +3 -3
  197. package/dist/serialization/resources/empathicVoice/types/ToolErrorMessage.d.ts +6 -6
  198. package/dist/serialization/resources/empathicVoice/types/ToolErrorMessage.js +6 -6
  199. package/dist/serialization/resources/empathicVoice/types/ToolResponseMessage.d.ts +2 -2
  200. package/dist/serialization/resources/empathicVoice/types/ToolResponseMessage.js +2 -2
  201. package/dist/serialization/resources/empathicVoice/types/UserInput.d.ts +1 -1
  202. package/dist/serialization/resources/empathicVoice/types/UserInput.js +1 -1
  203. package/dist/serialization/resources/empathicVoice/types/UserInterruption.d.ts +1 -1
  204. package/dist/serialization/resources/empathicVoice/types/UserInterruption.js +1 -1
  205. package/dist/serialization/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  206. package/dist/serialization/resources/empathicVoice/types/UserMessage.js +3 -3
  207. package/dist/serialization/resources/empathicVoice/types/VoiceProvider.d.ts +1 -1
  208. package/dist/serialization/resources/empathicVoice/types/VoiceProvider.js +1 -1
  209. package/dist/serialization/resources/empathicVoice/types/WebSocketError.d.ts +3 -3
  210. package/dist/serialization/resources/empathicVoice/types/WebSocketError.js +3 -3
  211. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +4 -4
  212. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +4 -4
  213. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +3 -3
  214. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +3 -3
  215. package/dist/serialization/resources/empathicVoice/types/index.d.ts +16 -16
  216. package/dist/serialization/resources/empathicVoice/types/index.js +16 -16
  217. package/dist/serialization/resources/tts/types/PostedTts.d.ts +3 -3
  218. package/dist/serialization/resources/tts/types/PostedTts.js +3 -3
  219. package/dist/serialization/resources/tts/types/PostedUtterance.d.ts +2 -2
  220. package/dist/serialization/resources/tts/types/PostedUtterance.js +2 -2
  221. package/dist/serialization/resources/tts/types/ReturnGeneration.d.ts +3 -3
  222. package/dist/serialization/resources/tts/types/ReturnGeneration.js +3 -3
  223. package/dist/serialization/resources/tts/types/ReturnTts.d.ts +1 -1
  224. package/dist/serialization/resources/tts/types/ReturnTts.js +1 -1
  225. package/dist/serialization/resources/tts/types/Snippet.d.ts +3 -3
  226. package/dist/serialization/resources/tts/types/Snippet.js +3 -3
  227. package/dist/serialization/resources/tts/types/SnippetAudioChunk.d.ts +0 -8
  228. package/dist/serialization/resources/tts/types/SnippetAudioChunk.js +1 -10
  229. package/dist/version.d.ts +1 -1
  230. package/dist/version.js +1 -1
  231. package/jest.browser.config.mjs +10 -0
  232. package/jest.config.mjs +1 -0
  233. package/package.json +6 -7
  234. package/reference.md +25 -27
  235. package/serialization/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
  236. package/serialization/resources/empathicVoice/types/AssistantEnd.js +1 -1
  237. package/serialization/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  238. package/serialization/resources/empathicVoice/types/AssistantInput.js +1 -1
  239. package/serialization/resources/empathicVoice/types/AssistantMessage.d.ts +2 -2
  240. package/serialization/resources/empathicVoice/types/AssistantMessage.js +2 -2
  241. package/serialization/resources/empathicVoice/types/AssistantProsody.d.ts +2 -2
  242. package/serialization/resources/empathicVoice/types/AssistantProsody.js +2 -2
  243. package/serialization/resources/empathicVoice/types/AudioConfiguration.d.ts +1 -1
  244. package/serialization/resources/empathicVoice/types/AudioConfiguration.js +1 -1
  245. package/serialization/resources/empathicVoice/types/AudioInput.d.ts +1 -1
  246. package/serialization/resources/empathicVoice/types/AudioInput.js +1 -1
  247. package/serialization/resources/empathicVoice/types/AudioOutput.d.ts +2 -2
  248. package/serialization/resources/empathicVoice/types/AudioOutput.js +2 -2
  249. package/serialization/resources/empathicVoice/types/BuiltinToolConfig.d.ts +1 -1
  250. package/serialization/resources/empathicVoice/types/BuiltinToolConfig.js +1 -1
  251. package/serialization/resources/empathicVoice/types/ChatMessage.d.ts +1 -1
  252. package/serialization/resources/empathicVoice/types/ChatMessage.js +1 -1
  253. package/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +2 -2
  254. package/serialization/resources/empathicVoice/types/ChatMetadata.js +2 -2
  255. package/serialization/resources/empathicVoice/types/Context.d.ts +1 -1
  256. package/serialization/resources/empathicVoice/types/Context.js +1 -1
  257. package/serialization/resources/empathicVoice/types/ContextType.d.ts +1 -1
  258. package/serialization/resources/empathicVoice/types/ContextType.js +1 -1
  259. package/serialization/resources/empathicVoice/types/LanguageModelType.d.ts +1 -1
  260. package/serialization/resources/empathicVoice/types/LanguageModelType.js +19 -0
  261. package/serialization/resources/empathicVoice/types/ModelProviderEnum.d.ts +1 -1
  262. package/serialization/resources/empathicVoice/types/ModelProviderEnum.js +3 -0
  263. package/serialization/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  264. package/serialization/resources/empathicVoice/types/PauseAssistantMessage.js +1 -1
  265. package/serialization/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -1
  266. package/serialization/resources/empathicVoice/types/ResumeAssistantMessage.js +1 -1
  267. package/serialization/resources/empathicVoice/types/ReturnChatEventType.d.ts +1 -1
  268. package/serialization/resources/empathicVoice/types/ReturnChatEventType.js +9 -4
  269. package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +9 -9
  270. package/serialization/resources/empathicVoice/types/ReturnConfig.js +9 -9
  271. package/serialization/resources/empathicVoice/types/ReturnPrompt.d.ts +1 -1
  272. package/serialization/resources/empathicVoice/types/ReturnPrompt.js +1 -1
  273. package/serialization/resources/empathicVoice/types/SessionSettings.d.ts +8 -8
  274. package/serialization/resources/empathicVoice/types/SessionSettings.js +8 -8
  275. package/serialization/resources/empathicVoice/types/Tool.d.ts +3 -3
  276. package/serialization/resources/empathicVoice/types/Tool.js +3 -3
  277. package/serialization/resources/empathicVoice/types/ToolCallMessage.d.ts +3 -3
  278. package/serialization/resources/empathicVoice/types/ToolCallMessage.js +3 -3
  279. package/serialization/resources/empathicVoice/types/ToolErrorMessage.d.ts +6 -6
  280. package/serialization/resources/empathicVoice/types/ToolErrorMessage.js +6 -6
  281. package/serialization/resources/empathicVoice/types/ToolResponseMessage.d.ts +2 -2
  282. package/serialization/resources/empathicVoice/types/ToolResponseMessage.js +2 -2
  283. package/serialization/resources/empathicVoice/types/UserInput.d.ts +1 -1
  284. package/serialization/resources/empathicVoice/types/UserInput.js +1 -1
  285. package/serialization/resources/empathicVoice/types/UserInterruption.d.ts +1 -1
  286. package/serialization/resources/empathicVoice/types/UserInterruption.js +1 -1
  287. package/serialization/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  288. package/serialization/resources/empathicVoice/types/UserMessage.js +3 -3
  289. package/serialization/resources/empathicVoice/types/VoiceProvider.d.ts +1 -1
  290. package/serialization/resources/empathicVoice/types/VoiceProvider.js +1 -1
  291. package/serialization/resources/empathicVoice/types/WebSocketError.d.ts +3 -3
  292. package/serialization/resources/empathicVoice/types/WebSocketError.js +3 -3
  293. package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.d.ts +4 -4
  294. package/serialization/resources/empathicVoice/types/WebhookEventChatEnded.js +4 -4
  295. package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.d.ts +3 -3
  296. package/serialization/resources/empathicVoice/types/WebhookEventChatStarted.js +3 -3
  297. package/serialization/resources/empathicVoice/types/index.d.ts +16 -16
  298. package/serialization/resources/empathicVoice/types/index.js +16 -16
  299. package/serialization/resources/tts/types/PostedTts.d.ts +3 -3
  300. package/serialization/resources/tts/types/PostedTts.js +3 -3
  301. package/serialization/resources/tts/types/PostedUtterance.d.ts +2 -2
  302. package/serialization/resources/tts/types/PostedUtterance.js +2 -2
  303. package/serialization/resources/tts/types/ReturnGeneration.d.ts +3 -3
  304. package/serialization/resources/tts/types/ReturnGeneration.js +3 -3
  305. package/serialization/resources/tts/types/ReturnTts.d.ts +1 -1
  306. package/serialization/resources/tts/types/ReturnTts.js +1 -1
  307. package/serialization/resources/tts/types/Snippet.d.ts +3 -3
  308. package/serialization/resources/tts/types/Snippet.js +3 -3
  309. package/serialization/resources/tts/types/SnippetAudioChunk.d.ts +0 -8
  310. package/serialization/resources/tts/types/SnippetAudioChunk.js +1 -10
  311. package/version.d.ts +1 -1
  312. package/version.js +1 -1
  313. package/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +0 -36
  314. package/api/resources/tts/client/requests/SynthesizeJsonRequest.js +0 -5
  315. package/api/resources/tts/client/requests/index.d.ts +0 -1
  316. package/core/form-data-utils/toReadableStream.d.ts +0 -1
  317. package/core/form-data-utils/toReadableStream.js +0 -50
  318. package/dist/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +0 -36
  319. package/dist/api/resources/tts/client/requests/SynthesizeJsonRequest.js +0 -5
  320. package/dist/api/resources/tts/client/requests/index.d.ts +0 -1
  321. package/dist/core/form-data-utils/toReadableStream.d.ts +0 -1
  322. package/dist/core/form-data-utils/toReadableStream.js +0 -50
  323. /package/{api/resources/tts/client/requests/index.js → core/file.js} +0 -0
  324. /package/dist/{api/resources/tts/client/requests/index.js → core/file.js} +0 -0
@@ -1,35 +1,35 @@
1
- export * from "./AssistantEnd";
2
1
  export * from "./AssistantInput";
3
- export * from "./AssistantMessage";
4
- export * from "./AssistantProsody";
5
2
  export * from "./AudioConfiguration";
6
3
  export * from "./AudioInput";
7
- export * from "./AudioOutput";
8
4
  export * from "./BuiltInTool";
9
5
  export * from "./BuiltinToolConfig";
10
- export * from "./ChatMessageToolResult";
11
- export * from "./ChatMessage";
12
- export * from "./ChatMetadata";
13
6
  export * from "./Context";
14
7
  export * from "./ContextType";
15
- export * from "./EmotionScores";
16
8
  export * from "./Encoding";
17
- export * from "./WebSocketError";
18
9
  export * from "./ErrorLevel";
19
- export * from "./Inference";
20
- export * from "./MillisecondInterval";
21
10
  export * from "./PauseAssistantMessage";
22
- export * from "./ProsodyInference";
23
11
  export * from "./ResumeAssistantMessage";
24
- export * from "./Role";
25
12
  export * from "./SessionSettingsVariablesValue";
26
13
  export * from "./SessionSettings";
27
14
  export * from "./Tool";
28
- export * from "./ToolCallMessage";
29
15
  export * from "./ToolErrorMessage";
30
16
  export * from "./ToolResponseMessage";
31
17
  export * from "./ToolType";
32
18
  export * from "./UserInput";
19
+ export * from "./AssistantEnd";
20
+ export * from "./AssistantMessage";
21
+ export * from "./AssistantProsody";
22
+ export * from "./AudioOutput";
23
+ export * from "./ChatMessageToolResult";
24
+ export * from "./ChatMessage";
25
+ export * from "./ChatMetadata";
26
+ export * from "./EmotionScores";
27
+ export * from "./WebSocketError";
28
+ export * from "./Inference";
29
+ export * from "./MillisecondInterval";
30
+ export * from "./ProsodyInference";
31
+ export * from "./Role";
32
+ export * from "./ToolCallMessage";
33
33
  export * from "./UserInterruption";
34
34
  export * from "./UserMessage";
35
35
  export * from "./JsonMessage";
@@ -38,12 +38,12 @@ export * from "./LanguageModelType";
38
38
  export * from "./ModelProviderEnum";
39
39
  export * from "./ValidationErrorLocItem";
40
40
  export * from "./ValidationError";
41
- export * from "./WebhookEventBase";
42
- export * from "./WebhookEvent";
43
41
  export * from "./WebhookEventChatEnded";
44
42
  export * from "./WebhookEventChatStartType";
45
43
  export * from "./WebhookEventChatStarted";
46
44
  export * from "./WebhookEventChatStatus";
45
+ export * from "./WebhookEvent";
46
+ export * from "./WebhookEventBase";
47
47
  export * from "./ErrorResponse";
48
48
  export * from "./ReturnPagedUserDefinedTools";
49
49
  export * from "./ReturnUserDefinedToolToolType";
@@ -14,38 +14,38 @@ 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("./AssistantEnd"), exports);
18
17
  __exportStar(require("./AssistantInput"), exports);
19
- __exportStar(require("./AssistantMessage"), exports);
20
- __exportStar(require("./AssistantProsody"), exports);
21
18
  __exportStar(require("./AudioConfiguration"), exports);
22
19
  __exportStar(require("./AudioInput"), exports);
23
- __exportStar(require("./AudioOutput"), exports);
24
20
  __exportStar(require("./BuiltInTool"), exports);
25
21
  __exportStar(require("./BuiltinToolConfig"), exports);
26
- __exportStar(require("./ChatMessageToolResult"), exports);
27
- __exportStar(require("./ChatMessage"), exports);
28
- __exportStar(require("./ChatMetadata"), exports);
29
22
  __exportStar(require("./Context"), exports);
30
23
  __exportStar(require("./ContextType"), exports);
31
- __exportStar(require("./EmotionScores"), exports);
32
24
  __exportStar(require("./Encoding"), exports);
33
- __exportStar(require("./WebSocketError"), exports);
34
25
  __exportStar(require("./ErrorLevel"), exports);
35
- __exportStar(require("./Inference"), exports);
36
- __exportStar(require("./MillisecondInterval"), exports);
37
26
  __exportStar(require("./PauseAssistantMessage"), exports);
38
- __exportStar(require("./ProsodyInference"), exports);
39
27
  __exportStar(require("./ResumeAssistantMessage"), exports);
40
- __exportStar(require("./Role"), exports);
41
28
  __exportStar(require("./SessionSettingsVariablesValue"), exports);
42
29
  __exportStar(require("./SessionSettings"), exports);
43
30
  __exportStar(require("./Tool"), exports);
44
- __exportStar(require("./ToolCallMessage"), exports);
45
31
  __exportStar(require("./ToolErrorMessage"), exports);
46
32
  __exportStar(require("./ToolResponseMessage"), exports);
47
33
  __exportStar(require("./ToolType"), exports);
48
34
  __exportStar(require("./UserInput"), exports);
35
+ __exportStar(require("./AssistantEnd"), exports);
36
+ __exportStar(require("./AssistantMessage"), exports);
37
+ __exportStar(require("./AssistantProsody"), exports);
38
+ __exportStar(require("./AudioOutput"), exports);
39
+ __exportStar(require("./ChatMessageToolResult"), exports);
40
+ __exportStar(require("./ChatMessage"), exports);
41
+ __exportStar(require("./ChatMetadata"), exports);
42
+ __exportStar(require("./EmotionScores"), exports);
43
+ __exportStar(require("./WebSocketError"), exports);
44
+ __exportStar(require("./Inference"), exports);
45
+ __exportStar(require("./MillisecondInterval"), exports);
46
+ __exportStar(require("./ProsodyInference"), exports);
47
+ __exportStar(require("./Role"), exports);
48
+ __exportStar(require("./ToolCallMessage"), exports);
49
49
  __exportStar(require("./UserInterruption"), exports);
50
50
  __exportStar(require("./UserMessage"), exports);
51
51
  __exportStar(require("./JsonMessage"), exports);
@@ -54,12 +54,12 @@ __exportStar(require("./LanguageModelType"), exports);
54
54
  __exportStar(require("./ModelProviderEnum"), exports);
55
55
  __exportStar(require("./ValidationErrorLocItem"), exports);
56
56
  __exportStar(require("./ValidationError"), exports);
57
- __exportStar(require("./WebhookEventBase"), exports);
58
- __exportStar(require("./WebhookEvent"), exports);
59
57
  __exportStar(require("./WebhookEventChatEnded"), exports);
60
58
  __exportStar(require("./WebhookEventChatStartType"), exports);
61
59
  __exportStar(require("./WebhookEventChatStarted"), exports);
62
60
  __exportStar(require("./WebhookEventChatStatus"), exports);
61
+ __exportStar(require("./WebhookEvent"), exports);
62
+ __exportStar(require("./WebhookEventBase"), exports);
63
63
  __exportStar(require("./ErrorResponse"), exports);
64
64
  __exportStar(require("./ReturnPagedUserDefinedTools"), exports);
65
65
  __exportStar(require("./ReturnUserDefinedToolToolType"), exports);
@@ -5,17 +5,17 @@ import * as serializers from "../../../index";
5
5
  import * as Hume from "../../../../api/index";
6
6
  import * as core from "../../../../core";
7
7
  import { PostedContext } from "./PostedContext";
8
- import { Format } from "./Format";
9
8
  import { PostedUtterance } from "./PostedUtterance";
9
+ import { Format } from "./Format";
10
10
  export declare const PostedTts: core.serialization.ObjectSchema<serializers.tts.PostedTts.Raw, Hume.tts.PostedTts>;
11
11
  export declare namespace PostedTts {
12
12
  interface Raw {
13
13
  context?: PostedContext.Raw | null;
14
- format?: Format.Raw | null;
14
+ utterances: PostedUtterance.Raw[];
15
15
  num_generations?: number | null;
16
+ format?: Format.Raw | null;
16
17
  split_utterances?: boolean | null;
17
18
  strip_headers?: boolean | null;
18
- utterances: PostedUtterance.Raw[];
19
19
  instant_mode?: boolean | null;
20
20
  }
21
21
  }
@@ -39,14 +39,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.PostedTts = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const PostedContext_1 = require("./PostedContext");
42
- const Format_1 = require("./Format");
43
42
  const PostedUtterance_1 = require("./PostedUtterance");
43
+ const Format_1 = require("./Format");
44
44
  exports.PostedTts = core.serialization.object({
45
45
  context: PostedContext_1.PostedContext.optional(),
46
- format: Format_1.Format.optional(),
46
+ utterances: core.serialization.list(PostedUtterance_1.PostedUtterance),
47
47
  numGenerations: core.serialization.property("num_generations", core.serialization.number().optional()),
48
+ format: Format_1.Format.optional(),
48
49
  splitUtterances: core.serialization.property("split_utterances", core.serialization.boolean().optional()),
49
50
  stripHeaders: core.serialization.property("strip_headers", core.serialization.boolean().optional()),
50
- utterances: core.serialization.list(PostedUtterance_1.PostedUtterance),
51
51
  instantMode: core.serialization.property("instant_mode", core.serialization.boolean().optional()),
52
52
  });
@@ -8,10 +8,10 @@ import { PostedUtteranceVoice } from "./PostedUtteranceVoice";
8
8
  export declare const PostedUtterance: core.serialization.ObjectSchema<serializers.tts.PostedUtterance.Raw, Hume.tts.PostedUtterance>;
9
9
  export declare namespace PostedUtterance {
10
10
  interface Raw {
11
+ text: string;
11
12
  description?: string | null;
13
+ voice?: PostedUtteranceVoice.Raw | null;
12
14
  speed?: number | null;
13
- text: string;
14
15
  trailing_silence?: number | null;
15
- voice?: PostedUtteranceVoice.Raw | null;
16
16
  }
17
17
  }
@@ -40,9 +40,9 @@ exports.PostedUtterance = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const PostedUtteranceVoice_1 = require("./PostedUtteranceVoice");
42
42
  exports.PostedUtterance = core.serialization.object({
43
+ text: core.serialization.string(),
43
44
  description: core.serialization.string().optional(),
45
+ voice: PostedUtteranceVoice_1.PostedUtteranceVoice.optional(),
44
46
  speed: core.serialization.number().optional(),
45
- text: core.serialization.string(),
46
47
  trailingSilence: core.serialization.property("trailing_silence", core.serialization.number().optional()),
47
- voice: PostedUtteranceVoice_1.PostedUtteranceVoice.optional(),
48
48
  });
@@ -9,11 +9,11 @@ import { Snippet } from "./Snippet";
9
9
  export declare const ReturnGeneration: core.serialization.ObjectSchema<serializers.tts.ReturnGeneration.Raw, Hume.tts.ReturnGeneration>;
10
10
  export declare namespace ReturnGeneration {
11
11
  interface Raw {
12
- audio: string;
12
+ generation_id: string;
13
13
  duration: number;
14
- encoding: AudioEncoding.Raw;
15
14
  file_size: number;
16
- generation_id: string;
15
+ encoding: AudioEncoding.Raw;
16
+ audio: string;
17
17
  snippets: Snippet.Raw[][];
18
18
  }
19
19
  }
@@ -41,10 +41,10 @@ const core = __importStar(require("../../../../core"));
41
41
  const AudioEncoding_1 = require("./AudioEncoding");
42
42
  const Snippet_1 = require("./Snippet");
43
43
  exports.ReturnGeneration = core.serialization.object({
44
- audio: core.serialization.string(),
44
+ generationId: core.serialization.property("generation_id", core.serialization.string()),
45
45
  duration: core.serialization.number(),
46
- encoding: AudioEncoding_1.AudioEncoding,
47
46
  fileSize: core.serialization.property("file_size", core.serialization.number()),
48
- generationId: core.serialization.property("generation_id", core.serialization.string()),
47
+ encoding: AudioEncoding_1.AudioEncoding,
48
+ audio: core.serialization.string(),
49
49
  snippets: core.serialization.list(core.serialization.list(Snippet_1.Snippet)),
50
50
  });
@@ -8,7 +8,7 @@ import { ReturnGeneration } from "./ReturnGeneration";
8
8
  export declare const ReturnTts: core.serialization.ObjectSchema<serializers.tts.ReturnTts.Raw, Hume.tts.ReturnTts>;
9
9
  export declare namespace ReturnTts {
10
10
  interface Raw {
11
- generations: ReturnGeneration.Raw[];
12
11
  request_id?: string | null;
12
+ generations: ReturnGeneration.Raw[];
13
13
  }
14
14
  }
@@ -40,6 +40,6 @@ exports.ReturnTts = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const ReturnGeneration_1 = require("./ReturnGeneration");
42
42
  exports.ReturnTts = core.serialization.object({
43
- generations: core.serialization.list(ReturnGeneration_1.ReturnGeneration),
44
43
  requestId: core.serialization.property("request_id", core.serialization.string().optional()),
44
+ generations: core.serialization.list(ReturnGeneration_1.ReturnGeneration),
45
45
  });
@@ -7,11 +7,11 @@ import * as core from "../../../../core";
7
7
  export declare const Snippet: core.serialization.ObjectSchema<serializers.tts.Snippet.Raw, Hume.tts.Snippet>;
8
8
  export declare namespace Snippet {
9
9
  interface Raw {
10
- audio: string;
11
- generation_id: string;
12
10
  id: string;
13
11
  text: string;
14
- transcribed_text?: string | null;
12
+ generation_id: string;
15
13
  utterance_index?: number | null;
14
+ transcribed_text?: string | null;
15
+ audio: string;
16
16
  }
17
17
  }
@@ -39,10 +39,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.Snippet = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  exports.Snippet = core.serialization.object({
42
- audio: core.serialization.string(),
43
- generationId: core.serialization.property("generation_id", core.serialization.string()),
44
42
  id: core.serialization.string(),
45
43
  text: core.serialization.string(),
46
- transcribedText: core.serialization.property("transcribed_text", core.serialization.string().optional()),
44
+ generationId: core.serialization.property("generation_id", core.serialization.string()),
47
45
  utteranceIndex: core.serialization.property("utterance_index", core.serialization.number().optional()),
46
+ transcribedText: core.serialization.property("transcribed_text", core.serialization.string().optional()),
47
+ audio: core.serialization.string(),
48
48
  });
@@ -7,13 +7,5 @@ import * as core from "../../../../core";
7
7
  export declare const SnippetAudioChunk: core.serialization.ObjectSchema<serializers.tts.SnippetAudioChunk.Raw, Hume.tts.SnippetAudioChunk>;
8
8
  export declare namespace SnippetAudioChunk {
9
9
  interface Raw {
10
- audio: string;
11
- chunk_index: number;
12
- generation_id: string;
13
- is_last_chunk: boolean;
14
- snippet_id: string;
15
- text: string;
16
- transcribed_text?: string | null;
17
- utterance_index?: number | null;
18
10
  }
19
11
  }
@@ -38,13 +38,4 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.SnippetAudioChunk = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
- exports.SnippetAudioChunk = core.serialization.object({
42
- audio: core.serialization.string(),
43
- chunkIndex: core.serialization.property("chunk_index", core.serialization.number()),
44
- generationId: core.serialization.property("generation_id", core.serialization.string()),
45
- isLastChunk: core.serialization.property("is_last_chunk", core.serialization.boolean()),
46
- snippetId: core.serialization.property("snippet_id", core.serialization.string()),
47
- text: core.serialization.string(),
48
- transcribedText: core.serialization.property("transcribed_text", core.serialization.string().optional()),
49
- utteranceIndex: core.serialization.property("utterance_index", core.serialization.number().optional()),
50
- });
41
+ exports.SnippetAudioChunk = core.serialization.object({});
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.12.1";
1
+ export declare const SDK_VERSION = "0.13.0";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.12.1";
4
+ exports.SDK_VERSION = "0.13.0";
@@ -0,0 +1,10 @@
1
+ /** @type {import('jest').Config} */
2
+ export default {
3
+ preset: "ts-jest",
4
+ testEnvironment: "<rootDir>/tests/BrowserTestEnvironment.ts",
5
+ testMatch: ["**/tests/**/*.browser.test.ts"],
6
+ moduleNameMapper: {
7
+ "^(\\.{1,2}/.*)\\.js$": "$1",
8
+ },
9
+ passWithNoTests: true,
10
+ };
package/jest.config.mjs CHANGED
@@ -2,6 +2,7 @@
2
2
  export default {
3
3
  preset: "ts-jest",
4
4
  testEnvironment: "node",
5
+ testPathIgnorePatterns: [".*\\.browser\\.test\\.ts$"],
5
6
  moduleNameMapper: {
6
7
  "(.+)\.js$": "$1",
7
8
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hume",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "private": false,
5
5
  "repository": "https://github.com/HumeAI/hume-typescript-sdk",
6
6
  "main": "./index.js",
@@ -9,18 +9,16 @@
9
9
  "format": "prettier . --write --ignore-unknown",
10
10
  "build": "tsc",
11
11
  "prepack": "cp -rv dist/. .",
12
- "test": "jest tests/unit --passWithNoTests",
13
- "test:wire": "jest tests/wire --passWithNoTests",
12
+ "test": "jest tests/unit",
13
+ "test:browser": "jest --config jest.browser.config.mjs",
14
+ "test:wire": "jest tests/wire",
14
15
  "wire:test": "yarn test:wire"
15
16
  },
16
17
  "dependencies": {
17
18
  "url-join": "4.0.1",
18
- "form-data": "^4.0.0",
19
- "formdata-node": "^6.0.3",
20
19
  "node-fetch": "^2.7.0",
21
20
  "qs": "^6.13.1",
22
21
  "readable-stream": "^4.5.2",
23
- "form-data-encoder": "^4.0.2",
24
22
  "ws": "^8.14.2",
25
23
  "uuid": "9.0.1",
26
24
  "zod": "^3.23.8"
@@ -47,7 +45,8 @@
47
45
  "browser": {
48
46
  "fs": false,
49
47
  "os": false,
50
- "path": false
48
+ "path": false,
49
+ "stream": false
51
50
  },
52
51
  "packageManager": "yarn@1.22.22"
53
52
  }
package/reference.md CHANGED
@@ -33,28 +33,26 @@ The response includes the base64-encoded audio and metadata in JSON format.
33
33
 
34
34
  ```typescript
35
35
  await client.tts.synthesizeJson({
36
- body: {
36
+ utterances: [
37
+ {
38
+ text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.",
39
+ description:
40
+ "Middle-aged masculine voice with a clear, rhythmic Scots lilt, rounded vowels, and a warm, steady tone with an articulate, academic quality.",
41
+ },
42
+ ],
43
+ context: {
37
44
  utterances: [
38
45
  {
39
- text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.",
46
+ text: "How can people see beauty so differently?",
40
47
  description:
41
- "Middle-aged masculine voice with a clear, rhythmic Scots lilt, rounded vowels, and a warm, steady tone with an articulate, academic quality.",
48
+ "A curious student with a clear and respectful tone, seeking clarification on Hume's ideas with a straightforward question.",
42
49
  },
43
50
  ],
44
- context: {
45
- utterances: [
46
- {
47
- text: "How can people see beauty so differently?",
48
- description:
49
- "A curious student with a clear and respectful tone, seeking clarification on Hume's ideas with a straightforward question.",
50
- },
51
- ],
52
- },
53
- format: {
54
- type: "mp3",
55
- },
56
- numGenerations: 1,
57
51
  },
52
+ format: {
53
+ type: "mp3",
54
+ },
55
+ numGenerations: 1,
58
56
  });
59
57
  ```
60
58
 
@@ -71,7 +69,7 @@ await client.tts.synthesizeJson({
71
69
  <dl>
72
70
  <dd>
73
71
 
74
- **request:** `Hume.tts.SynthesizeJsonRequest`
72
+ **request:** `Hume.PostedTts`
75
73
 
76
74
  </dd>
77
75
  </dl>
@@ -170,7 +168,7 @@ await client.tts.synthesizeFile({
170
168
  </dl>
171
169
  </details>
172
170
 
173
- <details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">synthesizeFileStreaming</a>({ ...params }) -> stream.Readable</code></summary>
171
+ <details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">synthesizeJsonStreaming</a>({ ...params }) -> core.Stream<Hume.SnippetAudioChunk></code></summary>
174
172
  <dl>
175
173
  <dd>
176
174
 
@@ -184,6 +182,8 @@ await client.tts.synthesizeFile({
184
182
 
185
183
  Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
186
184
 
185
+ The response is a stream of JSON objects including audio encoded in base64.
186
+
187
187
  </dd>
188
188
  </dl>
189
189
  </dd>
@@ -198,7 +198,7 @@ Streams synthesized speech using the specified voice. If no voice is provided, a
198
198
  <dd>
199
199
 
200
200
  ```typescript
201
- await client.tts.synthesizeFileStreaming({
201
+ const response = await client.tts.synthesizeJsonStreaming({
202
202
  utterances: [
203
203
  {
204
204
  text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.",
@@ -209,6 +209,9 @@ await client.tts.synthesizeFileStreaming({
209
209
  },
210
210
  ],
211
211
  });
212
+ for await (const item of response) {
213
+ console.log(item);
214
+ }
212
215
  ```
213
216
 
214
217
  </dd>
@@ -243,7 +246,7 @@ await client.tts.synthesizeFileStreaming({
243
246
  </dl>
244
247
  </details>
245
248
 
246
- <details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">synthesizeJsonStreaming</a>({ ...params }) -> core.Stream<Hume.SnippetAudioChunk></code></summary>
249
+ <details><summary><code>client.tts.<a href="/src/api/resources/tts/client/Client.ts">synthesizeFileStreaming</a>({ ...params }) -> stream.Readable</code></summary>
247
250
  <dl>
248
251
  <dd>
249
252
 
@@ -257,8 +260,6 @@ await client.tts.synthesizeFileStreaming({
257
260
 
258
261
  Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
259
262
 
260
- The response is a stream of JSON objects including audio encoded in base64.
261
-
262
263
  </dd>
263
264
  </dl>
264
265
  </dd>
@@ -273,7 +274,7 @@ The response is a stream of JSON objects including audio encoded in base64.
273
274
  <dd>
274
275
 
275
276
  ```typescript
276
- const response = await client.tts.synthesizeJsonStreaming({
277
+ await client.tts.synthesizeFileStreaming({
277
278
  utterances: [
278
279
  {
279
280
  text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.",
@@ -284,9 +285,6 @@ const response = await client.tts.synthesizeJsonStreaming({
284
285
  },
285
286
  ],
286
287
  });
287
- for await (const item of response) {
288
- console.log(item);
289
- }
290
288
  ```
291
289
 
292
290
  </dd>
@@ -3532,7 +3530,7 @@ await client.expressionMeasurement.batch.startInferenceJobFromLocalFile(
3532
3530
  <dl>
3533
3531
  <dd>
3534
3532
 
3535
- **file:** `File[] | fs.ReadStream[] | Blob[]`
3533
+ **file:** `core.FileLike[]`
3536
3534
 
3537
3535
  </dd>
3538
3536
  </dl>
@@ -7,7 +7,7 @@ import * as core from "../../../../core";
7
7
  export declare const AssistantEnd: core.serialization.ObjectSchema<serializers.empathicVoice.AssistantEnd.Raw, Hume.empathicVoice.AssistantEnd>;
8
8
  export declare namespace AssistantEnd {
9
9
  interface Raw {
10
- custom_session_id?: string | null;
11
10
  type: "assistant_end";
11
+ custom_session_id?: string | null;
12
12
  }
13
13
  }
@@ -39,6 +39,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.AssistantEnd = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  exports.AssistantEnd = core.serialization.object({
42
- customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
43
42
  type: core.serialization.stringLiteral("assistant_end"),
43
+ customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
44
44
  });
@@ -7,8 +7,8 @@ import * as core from "../../../../core";
7
7
  export declare const AssistantInput: core.serialization.ObjectSchema<serializers.empathicVoice.AssistantInput.Raw, Hume.empathicVoice.AssistantInput>;
8
8
  export declare namespace AssistantInput {
9
9
  interface Raw {
10
+ type: "assistant_input";
10
11
  custom_session_id?: string | null;
11
12
  text: string;
12
- type: "assistant_input";
13
13
  }
14
14
  }
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.AssistantInput = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  exports.AssistantInput = core.serialization.object({
42
+ type: core.serialization.stringLiteral("assistant_input"),
42
43
  customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
43
44
  text: core.serialization.string(),
44
- type: core.serialization.stringLiteral("assistant_input"),
45
45
  });
@@ -9,11 +9,11 @@ import { Inference } from "./Inference";
9
9
  export declare const AssistantMessage: core.serialization.ObjectSchema<serializers.empathicVoice.AssistantMessage.Raw, Hume.empathicVoice.AssistantMessage>;
10
10
  export declare namespace AssistantMessage {
11
11
  interface Raw {
12
+ type: "assistant_message";
12
13
  custom_session_id?: string | null;
13
- from_text: boolean;
14
14
  id?: string | null;
15
15
  message: ChatMessage.Raw;
16
16
  models: Inference.Raw;
17
- type: "assistant_message";
17
+ from_text: boolean;
18
18
  }
19
19
  }
@@ -41,10 +41,10 @@ const core = __importStar(require("../../../../core"));
41
41
  const ChatMessage_1 = require("./ChatMessage");
42
42
  const Inference_1 = require("./Inference");
43
43
  exports.AssistantMessage = core.serialization.object({
44
+ type: core.serialization.stringLiteral("assistant_message"),
44
45
  customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
45
- fromText: core.serialization.property("from_text", core.serialization.boolean()),
46
46
  id: core.serialization.string().optional(),
47
47
  message: ChatMessage_1.ChatMessage,
48
48
  models: Inference_1.Inference,
49
- type: core.serialization.stringLiteral("assistant_message"),
49
+ fromText: core.serialization.property("from_text", core.serialization.boolean()),
50
50
  });
@@ -8,9 +8,9 @@ import { Inference } from "./Inference";
8
8
  export declare const AssistantProsody: core.serialization.ObjectSchema<serializers.empathicVoice.AssistantProsody.Raw, Hume.empathicVoice.AssistantProsody>;
9
9
  export declare namespace AssistantProsody {
10
10
  interface Raw {
11
+ type: "assistant_prosody";
11
12
  custom_session_id?: string | null;
12
- id?: string | null;
13
13
  models: Inference.Raw;
14
- type: "assistant_prosody";
14
+ id?: string | null;
15
15
  }
16
16
  }
@@ -40,8 +40,8 @@ exports.AssistantProsody = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const Inference_1 = require("./Inference");
42
42
  exports.AssistantProsody = core.serialization.object({
43
+ type: core.serialization.stringLiteral("assistant_prosody"),
43
44
  customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
44
- id: core.serialization.string().optional(),
45
45
  models: Inference_1.Inference,
46
- type: core.serialization.stringLiteral("assistant_prosody"),
46
+ id: core.serialization.string().optional(),
47
47
  });
@@ -8,8 +8,8 @@ import { Encoding } from "./Encoding";
8
8
  export declare const AudioConfiguration: core.serialization.ObjectSchema<serializers.empathicVoice.AudioConfiguration.Raw, Hume.empathicVoice.AudioConfiguration>;
9
9
  export declare namespace AudioConfiguration {
10
10
  interface Raw {
11
- channels: number;
12
11
  encoding: Encoding.Raw;
12
+ channels: number;
13
13
  sample_rate: number;
14
14
  }
15
15
  }
@@ -40,7 +40,7 @@ exports.AudioConfiguration = void 0;
40
40
  const core = __importStar(require("../../../../core"));
41
41
  const Encoding_1 = require("./Encoding");
42
42
  exports.AudioConfiguration = core.serialization.object({
43
- channels: core.serialization.number(),
44
43
  encoding: Encoding_1.Encoding,
44
+ channels: core.serialization.number(),
45
45
  sampleRate: core.serialization.property("sample_rate", core.serialization.number()),
46
46
  });