sarvamai 1.1.18 → 1.1.19-alpha.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 (344) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +6 -0
  3. package/dist/cjs/Client.js +44 -34
  4. package/dist/cjs/api/errors/LengthRequiredError.d.ts +5 -0
  5. package/dist/cjs/api/errors/LengthRequiredError.js +54 -0
  6. package/dist/cjs/api/errors/MethodNotAllowedError.d.ts +6 -0
  7. package/dist/cjs/api/errors/MethodNotAllowedError.js +54 -0
  8. package/dist/cjs/api/errors/RequestTimeoutError.d.ts +5 -0
  9. package/dist/cjs/api/errors/RequestTimeoutError.js +54 -0
  10. package/dist/cjs/api/errors/index.d.ts +3 -0
  11. package/dist/cjs/api/errors/index.js +3 -0
  12. package/dist/cjs/api/resources/dictate/client/Client.d.ts +78 -0
  13. package/dist/cjs/api/resources/dictate/client/Client.js +205 -0
  14. package/dist/cjs/api/resources/dictate/client/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/dictate/client/index.js +17 -0
  16. package/dist/cjs/api/resources/dictate/client/requests/DictateRequest.d.ts +37 -0
  17. package/dist/cjs/api/resources/dictate/client/requests/DictateRequest.js +3 -0
  18. package/dist/cjs/api/resources/dictate/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/dictate/client/requests/index.js +2 -0
  20. package/dist/cjs/api/resources/dictate/exports.d.ts +3 -0
  21. package/dist/cjs/api/resources/dictate/exports.js +22 -0
  22. package/dist/cjs/api/resources/dictate/index.d.ts +2 -0
  23. package/dist/cjs/api/resources/dictate/index.js +18 -0
  24. package/dist/cjs/api/resources/dictate/resources/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/dictate/resources/index.js +41 -0
  26. package/dist/cjs/api/resources/dictate/resources/jobs/client/Client.d.ts +117 -0
  27. package/dist/cjs/api/resources/dictate/resources/jobs/client/Client.js +342 -0
  28. package/dist/cjs/api/resources/dictate/resources/jobs/client/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/dictate/resources/jobs/client/index.js +17 -0
  30. package/dist/cjs/api/resources/dictate/resources/jobs/client/requests/DictateJobRequest.d.ts +37 -0
  31. package/dist/cjs/api/resources/dictate/resources/jobs/client/requests/DictateJobRequest.js +3 -0
  32. package/dist/cjs/api/resources/dictate/resources/jobs/client/requests/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/dictate/resources/jobs/client/requests/index.js +2 -0
  34. package/dist/cjs/api/resources/dictate/resources/jobs/exports.d.ts +2 -0
  35. package/dist/cjs/api/resources/dictate/resources/jobs/exports.js +21 -0
  36. package/dist/cjs/api/resources/dictate/resources/jobs/index.d.ts +1 -0
  37. package/dist/cjs/api/resources/dictate/resources/jobs/index.js +17 -0
  38. package/dist/cjs/api/resources/dictateStreaming/client/Client.d.ts +35 -0
  39. package/dist/cjs/api/resources/dictateStreaming/client/Client.js +86 -0
  40. package/dist/cjs/api/resources/dictateStreaming/client/Socket.d.ts +55 -0
  41. package/dist/cjs/api/resources/dictateStreaming/client/Socket.js +174 -0
  42. package/dist/cjs/api/resources/dictateStreaming/client/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/dictateStreaming/client/index.js +2 -0
  44. package/dist/cjs/api/resources/dictateStreaming/exports.d.ts +2 -0
  45. package/dist/cjs/api/resources/dictateStreaming/exports.js +21 -0
  46. package/dist/cjs/api/resources/dictateStreaming/index.d.ts +2 -0
  47. package/dist/cjs/api/resources/dictateStreaming/index.js +18 -0
  48. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEncoding.d.ts +11 -0
  49. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEncoding.js +14 -0
  50. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEndpointing.d.ts +11 -0
  51. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingEndpointing.js +14 -0
  52. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.d.ts +58 -0
  53. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.js +61 -0
  54. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingMode.d.ts +15 -0
  55. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingMode.js +18 -0
  56. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.d.ts +6 -0
  57. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.js +9 -0
  58. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingStreamType.d.ts +13 -0
  59. package/dist/cjs/api/resources/dictateStreaming/types/DictateStreamingStreamType.js +16 -0
  60. package/dist/cjs/api/resources/dictateStreaming/types/index.d.ts +6 -0
  61. package/dist/cjs/api/resources/dictateStreaming/types/index.js +22 -0
  62. package/dist/cjs/api/resources/index.d.ts +4 -0
  63. package/dist/cjs/api/resources/index.js +5 -1
  64. package/dist/cjs/api/resources/voiceCloning/client/Client.d.ts +2 -2
  65. package/dist/cjs/api/resources/voiceCloning/client/Client.js +24 -33
  66. package/dist/cjs/api/resources/voiceCloning/client/requests/CreateVoiceRequest.d.ts +0 -2
  67. package/dist/cjs/api/resources/voiceCloning/client/requests/VoiceCloningRequest.d.ts +0 -2
  68. package/dist/cjs/api/resources/voiceCloning/client/requests/VoiceCloningStreamRequest.d.ts +0 -2
  69. package/dist/cjs/api/types/DictateAudioInput.d.ts +8 -0
  70. package/dist/cjs/api/types/DictateAudioInput.js +3 -0
  71. package/dist/cjs/api/types/DictateCallback.d.ts +9 -0
  72. package/dist/cjs/api/types/DictateCallback.js +3 -0
  73. package/dist/cjs/api/types/DictateConfigUpdate.d.ts +47 -0
  74. package/dist/cjs/api/types/DictateConfigUpdate.js +17 -0
  75. package/dist/cjs/api/types/DictateConfigUpdated.d.ts +10 -0
  76. package/dist/cjs/api/types/DictateConfigUpdated.js +3 -0
  77. package/dist/cjs/api/types/DictateContext.d.ts +9 -0
  78. package/dist/cjs/api/types/DictateContext.js +3 -0
  79. package/dist/cjs/api/types/DictateCorrection.d.ts +11 -0
  80. package/dist/cjs/api/types/DictateCorrection.js +3 -0
  81. package/dist/cjs/api/types/DictateCorrectionSource.d.ts +6 -0
  82. package/dist/cjs/api/types/DictateCorrectionSource.js +9 -0
  83. package/dist/cjs/api/types/DictateDegradedReason.d.ts +19 -0
  84. package/dist/cjs/api/types/DictateDegradedReason.js +22 -0
  85. package/dist/cjs/api/types/DictateDictationFinal.d.ts +53 -0
  86. package/dist/cjs/api/types/DictateDictationFinal.js +25 -0
  87. package/dist/cjs/api/types/DictateEnd.d.ts +6 -0
  88. package/dist/cjs/api/types/DictateEnd.js +3 -0
  89. package/dist/cjs/api/types/DictateError.d.ts +43 -0
  90. package/dist/cjs/api/types/DictateError.js +3 -0
  91. package/dist/cjs/api/types/DictateFlush.d.ts +6 -0
  92. package/dist/cjs/api/types/DictateFlush.js +3 -0
  93. package/dist/cjs/api/types/DictateJob.d.ts +15 -0
  94. package/dist/cjs/api/types/DictateJob.js +3 -0
  95. package/dist/cjs/api/types/DictateJobCreateResponse.d.ts +5 -0
  96. package/dist/cjs/api/types/DictateJobCreateResponse.js +3 -0
  97. package/dist/cjs/api/types/DictateJobError.d.ts +17 -0
  98. package/dist/cjs/api/types/DictateJobError.js +3 -0
  99. package/dist/cjs/api/types/DictateJobResult.d.ts +23 -0
  100. package/dist/cjs/api/types/DictateJobResult.js +3 -0
  101. package/dist/cjs/api/types/DictateJobState.d.ts +15 -0
  102. package/dist/cjs/api/types/DictateJobState.js +18 -0
  103. package/dist/cjs/api/types/DictateLanguageCode.d.ts +32 -0
  104. package/dist/cjs/api/types/DictateLanguageCode.js +35 -0
  105. package/dist/cjs/api/types/DictateMode.d.ts +17 -0
  106. package/dist/cjs/api/types/DictateMode.js +20 -0
  107. package/dist/cjs/api/types/DictateModel.d.ts +6 -0
  108. package/dist/cjs/api/types/DictateModel.js +3 -0
  109. package/dist/cjs/api/types/DictateOutput.d.ts +11 -0
  110. package/dist/cjs/api/types/DictateOutput.js +3 -0
  111. package/dist/cjs/api/types/DictateOutputDegradedReason.d.ts +17 -0
  112. package/dist/cjs/api/types/DictateOutputDegradedReason.js +20 -0
  113. package/dist/cjs/api/types/DictateOutputFinal.d.ts +51 -0
  114. package/dist/cjs/api/types/DictateOutputFinal.js +23 -0
  115. package/dist/cjs/api/types/DictateOutputRules.d.ts +13 -0
  116. package/dist/cjs/api/types/DictateOutputRules.js +3 -0
  117. package/dist/cjs/api/types/DictateOutputUsage.d.ts +6 -0
  118. package/dist/cjs/api/types/DictateOutputUsage.js +3 -0
  119. package/dist/cjs/api/types/DictatePing.d.ts +6 -0
  120. package/dist/cjs/api/types/DictatePing.js +3 -0
  121. package/dist/cjs/api/types/DictatePong.d.ts +6 -0
  122. package/dist/cjs/api/types/DictatePong.js +3 -0
  123. package/dist/cjs/api/types/DictateResponse.d.ts +20 -0
  124. package/dist/cjs/api/types/DictateResponse.js +3 -0
  125. package/dist/cjs/api/types/DictateSection.d.ts +24 -0
  126. package/dist/cjs/api/types/DictateSection.js +3 -0
  127. package/dist/cjs/api/types/DictateSegment.d.ts +13 -0
  128. package/dist/cjs/api/types/DictateSegment.js +3 -0
  129. package/dist/cjs/api/types/DictateSessionBegin.d.ts +10 -0
  130. package/dist/cjs/api/types/DictateSessionBegin.js +3 -0
  131. package/dist/cjs/api/types/DictateSessionEnd.d.ts +16 -0
  132. package/dist/cjs/api/types/DictateSessionEnd.js +3 -0
  133. package/dist/cjs/api/types/DictateSpeechEnd.d.ts +6 -0
  134. package/dist/cjs/api/types/DictateSpeechEnd.js +3 -0
  135. package/dist/cjs/api/types/DictateSpeechStart.d.ts +6 -0
  136. package/dist/cjs/api/types/DictateSpeechStart.js +3 -0
  137. package/dist/cjs/api/types/DictateStreamingContext.d.ts +9 -0
  138. package/dist/cjs/api/types/DictateStreamingContext.js +3 -0
  139. package/dist/cjs/api/types/DictateStreamingCorrection.d.ts +17 -0
  140. package/dist/cjs/api/types/DictateStreamingCorrection.js +11 -0
  141. package/dist/cjs/api/types/DictateStreamingStyle.d.ts +44 -0
  142. package/dist/cjs/api/types/DictateStreamingStyle.js +21 -0
  143. package/dist/cjs/api/types/DictateStreamingUsage.d.ts +24 -0
  144. package/dist/cjs/api/types/DictateStreamingUsage.js +3 -0
  145. package/dist/cjs/api/types/DictateStreamingVocabularyEntry.d.ts +11 -0
  146. package/dist/cjs/api/types/DictateStreamingVocabularyEntry.js +3 -0
  147. package/dist/cjs/api/types/DictateStyle.d.ts +13 -0
  148. package/dist/cjs/api/types/DictateStyle.js +3 -0
  149. package/dist/cjs/api/types/DictateStylePreset.d.ts +15 -0
  150. package/dist/cjs/api/types/DictateStylePreset.js +18 -0
  151. package/dist/cjs/api/types/DictateTranscriptFinal.d.ts +18 -0
  152. package/dist/cjs/api/types/DictateTranscriptFinal.js +3 -0
  153. package/dist/cjs/api/types/DictateTranscriptPartial.d.ts +15 -0
  154. package/dist/cjs/api/types/DictateTranscriptPartial.js +3 -0
  155. package/dist/cjs/api/types/DictateUsage.d.ts +13 -0
  156. package/dist/cjs/api/types/DictateUsage.js +3 -0
  157. package/dist/cjs/api/types/DictateVadSpeechEnd.d.ts +9 -0
  158. package/dist/cjs/api/types/DictateVadSpeechEnd.js +3 -0
  159. package/dist/cjs/api/types/DictateVadSpeechStart.d.ts +9 -0
  160. package/dist/cjs/api/types/DictateVadSpeechStart.js +3 -0
  161. package/dist/cjs/api/types/DictateVocabulary.d.ts +5 -0
  162. package/dist/cjs/api/types/DictateVocabulary.js +3 -0
  163. package/dist/cjs/api/types/DictateVocabularyEntry.d.ts +11 -0
  164. package/dist/cjs/api/types/DictateVocabularyEntry.js +3 -0
  165. package/dist/cjs/api/types/VoiceCloningConfigureConnection.d.ts +0 -7
  166. package/dist/cjs/api/types/VoiceLibraryCreateData.d.ts +0 -2
  167. package/dist/cjs/api/types/VoiceLibraryDetail.d.ts +1 -1
  168. package/dist/cjs/api/types/index.d.ts +48 -0
  169. package/dist/cjs/api/types/index.js +48 -0
  170. package/dist/cjs/version.d.ts +1 -1
  171. package/dist/cjs/version.js +1 -1
  172. package/dist/esm/BaseClient.mjs +2 -2
  173. package/dist/esm/Client.d.mts +6 -0
  174. package/dist/esm/Client.mjs +10 -0
  175. package/dist/esm/api/errors/LengthRequiredError.d.mts +5 -0
  176. package/dist/esm/api/errors/LengthRequiredError.mjs +17 -0
  177. package/dist/esm/api/errors/MethodNotAllowedError.d.mts +6 -0
  178. package/dist/esm/api/errors/MethodNotAllowedError.mjs +17 -0
  179. package/dist/esm/api/errors/RequestTimeoutError.d.mts +5 -0
  180. package/dist/esm/api/errors/RequestTimeoutError.mjs +17 -0
  181. package/dist/esm/api/errors/index.d.mts +3 -0
  182. package/dist/esm/api/errors/index.mjs +3 -0
  183. package/dist/esm/api/resources/dictate/client/Client.d.mts +78 -0
  184. package/dist/esm/api/resources/dictate/client/Client.mjs +168 -0
  185. package/dist/esm/api/resources/dictate/client/index.d.mts +1 -0
  186. package/dist/esm/api/resources/dictate/client/index.mjs +1 -0
  187. package/dist/esm/api/resources/dictate/client/requests/DictateRequest.d.mts +37 -0
  188. package/dist/esm/api/resources/dictate/client/requests/DictateRequest.mjs +2 -0
  189. package/dist/esm/api/resources/dictate/client/requests/index.d.mts +1 -0
  190. package/dist/esm/api/resources/dictate/client/requests/index.mjs +1 -0
  191. package/dist/esm/api/resources/dictate/exports.d.mts +3 -0
  192. package/dist/esm/api/resources/dictate/exports.mjs +4 -0
  193. package/dist/esm/api/resources/dictate/index.d.mts +2 -0
  194. package/dist/esm/api/resources/dictate/index.mjs +2 -0
  195. package/dist/esm/api/resources/dictate/resources/index.d.mts +2 -0
  196. package/dist/esm/api/resources/dictate/resources/index.mjs +2 -0
  197. package/dist/esm/api/resources/dictate/resources/jobs/client/Client.d.mts +117 -0
  198. package/dist/esm/api/resources/dictate/resources/jobs/client/Client.mjs +305 -0
  199. package/dist/esm/api/resources/dictate/resources/jobs/client/index.d.mts +1 -0
  200. package/dist/esm/api/resources/dictate/resources/jobs/client/index.mjs +1 -0
  201. package/dist/esm/api/resources/dictate/resources/jobs/client/requests/DictateJobRequest.d.mts +37 -0
  202. package/dist/esm/api/resources/dictate/resources/jobs/client/requests/DictateJobRequest.mjs +2 -0
  203. package/dist/esm/api/resources/dictate/resources/jobs/client/requests/index.d.mts +1 -0
  204. package/dist/esm/api/resources/dictate/resources/jobs/client/requests/index.mjs +1 -0
  205. package/dist/esm/api/resources/dictate/resources/jobs/exports.d.mts +2 -0
  206. package/dist/esm/api/resources/dictate/resources/jobs/exports.mjs +3 -0
  207. package/dist/esm/api/resources/dictate/resources/jobs/index.d.mts +1 -0
  208. package/dist/esm/api/resources/dictate/resources/jobs/index.mjs +1 -0
  209. package/dist/esm/api/resources/dictateStreaming/client/Client.d.mts +35 -0
  210. package/dist/esm/api/resources/dictateStreaming/client/Client.mjs +49 -0
  211. package/dist/esm/api/resources/dictateStreaming/client/Socket.d.mts +55 -0
  212. package/dist/esm/api/resources/dictateStreaming/client/Socket.mjs +137 -0
  213. package/dist/esm/api/resources/dictateStreaming/client/index.d.mts +1 -0
  214. package/dist/esm/api/resources/dictateStreaming/client/index.mjs +1 -0
  215. package/dist/esm/api/resources/dictateStreaming/exports.d.mts +2 -0
  216. package/dist/esm/api/resources/dictateStreaming/exports.mjs +3 -0
  217. package/dist/esm/api/resources/dictateStreaming/index.d.mts +2 -0
  218. package/dist/esm/api/resources/dictateStreaming/index.mjs +2 -0
  219. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEncoding.d.mts +11 -0
  220. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEncoding.mjs +11 -0
  221. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEndpointing.d.mts +11 -0
  222. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingEndpointing.mjs +11 -0
  223. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.d.mts +58 -0
  224. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingLanguageCode.mjs +58 -0
  225. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingMode.d.mts +15 -0
  226. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingMode.mjs +15 -0
  227. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.d.mts +6 -0
  228. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingReturnTimestamps.mjs +6 -0
  229. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingStreamType.d.mts +13 -0
  230. package/dist/esm/api/resources/dictateStreaming/types/DictateStreamingStreamType.mjs +13 -0
  231. package/dist/esm/api/resources/dictateStreaming/types/index.d.mts +6 -0
  232. package/dist/esm/api/resources/dictateStreaming/types/index.mjs +6 -0
  233. package/dist/esm/api/resources/index.d.mts +4 -0
  234. package/dist/esm/api/resources/index.mjs +4 -0
  235. package/dist/esm/api/resources/voiceCloning/client/Client.d.mts +2 -2
  236. package/dist/esm/api/resources/voiceCloning/client/Client.mjs +24 -33
  237. package/dist/esm/api/resources/voiceCloning/client/requests/CreateVoiceRequest.d.mts +0 -2
  238. package/dist/esm/api/resources/voiceCloning/client/requests/VoiceCloningRequest.d.mts +0 -2
  239. package/dist/esm/api/resources/voiceCloning/client/requests/VoiceCloningStreamRequest.d.mts +0 -2
  240. package/dist/esm/api/types/DictateAudioInput.d.mts +8 -0
  241. package/dist/esm/api/types/DictateAudioInput.mjs +2 -0
  242. package/dist/esm/api/types/DictateCallback.d.mts +9 -0
  243. package/dist/esm/api/types/DictateCallback.mjs +2 -0
  244. package/dist/esm/api/types/DictateConfigUpdate.d.mts +47 -0
  245. package/dist/esm/api/types/DictateConfigUpdate.mjs +14 -0
  246. package/dist/esm/api/types/DictateConfigUpdated.d.mts +10 -0
  247. package/dist/esm/api/types/DictateConfigUpdated.mjs +2 -0
  248. package/dist/esm/api/types/DictateContext.d.mts +9 -0
  249. package/dist/esm/api/types/DictateContext.mjs +2 -0
  250. package/dist/esm/api/types/DictateCorrection.d.mts +11 -0
  251. package/dist/esm/api/types/DictateCorrection.mjs +2 -0
  252. package/dist/esm/api/types/DictateCorrectionSource.d.mts +6 -0
  253. package/dist/esm/api/types/DictateCorrectionSource.mjs +6 -0
  254. package/dist/esm/api/types/DictateDegradedReason.d.mts +19 -0
  255. package/dist/esm/api/types/DictateDegradedReason.mjs +19 -0
  256. package/dist/esm/api/types/DictateDictationFinal.d.mts +53 -0
  257. package/dist/esm/api/types/DictateDictationFinal.mjs +22 -0
  258. package/dist/esm/api/types/DictateEnd.d.mts +6 -0
  259. package/dist/esm/api/types/DictateEnd.mjs +2 -0
  260. package/dist/esm/api/types/DictateError.d.mts +43 -0
  261. package/dist/esm/api/types/DictateError.mjs +2 -0
  262. package/dist/esm/api/types/DictateFlush.d.mts +6 -0
  263. package/dist/esm/api/types/DictateFlush.mjs +2 -0
  264. package/dist/esm/api/types/DictateJob.d.mts +15 -0
  265. package/dist/esm/api/types/DictateJob.mjs +2 -0
  266. package/dist/esm/api/types/DictateJobCreateResponse.d.mts +5 -0
  267. package/dist/esm/api/types/DictateJobCreateResponse.mjs +2 -0
  268. package/dist/esm/api/types/DictateJobError.d.mts +17 -0
  269. package/dist/esm/api/types/DictateJobError.mjs +2 -0
  270. package/dist/esm/api/types/DictateJobResult.d.mts +23 -0
  271. package/dist/esm/api/types/DictateJobResult.mjs +2 -0
  272. package/dist/esm/api/types/DictateJobState.d.mts +15 -0
  273. package/dist/esm/api/types/DictateJobState.mjs +15 -0
  274. package/dist/esm/api/types/DictateLanguageCode.d.mts +32 -0
  275. package/dist/esm/api/types/DictateLanguageCode.mjs +32 -0
  276. package/dist/esm/api/types/DictateMode.d.mts +17 -0
  277. package/dist/esm/api/types/DictateMode.mjs +17 -0
  278. package/dist/esm/api/types/DictateModel.d.mts +6 -0
  279. package/dist/esm/api/types/DictateModel.mjs +2 -0
  280. package/dist/esm/api/types/DictateOutput.d.mts +11 -0
  281. package/dist/esm/api/types/DictateOutput.mjs +2 -0
  282. package/dist/esm/api/types/DictateOutputDegradedReason.d.mts +17 -0
  283. package/dist/esm/api/types/DictateOutputDegradedReason.mjs +17 -0
  284. package/dist/esm/api/types/DictateOutputFinal.d.mts +51 -0
  285. package/dist/esm/api/types/DictateOutputFinal.mjs +20 -0
  286. package/dist/esm/api/types/DictateOutputRules.d.mts +13 -0
  287. package/dist/esm/api/types/DictateOutputRules.mjs +2 -0
  288. package/dist/esm/api/types/DictateOutputUsage.d.mts +6 -0
  289. package/dist/esm/api/types/DictateOutputUsage.mjs +2 -0
  290. package/dist/esm/api/types/DictatePing.d.mts +6 -0
  291. package/dist/esm/api/types/DictatePing.mjs +2 -0
  292. package/dist/esm/api/types/DictatePong.d.mts +6 -0
  293. package/dist/esm/api/types/DictatePong.mjs +2 -0
  294. package/dist/esm/api/types/DictateResponse.d.mts +20 -0
  295. package/dist/esm/api/types/DictateResponse.mjs +2 -0
  296. package/dist/esm/api/types/DictateSection.d.mts +24 -0
  297. package/dist/esm/api/types/DictateSection.mjs +2 -0
  298. package/dist/esm/api/types/DictateSegment.d.mts +13 -0
  299. package/dist/esm/api/types/DictateSegment.mjs +2 -0
  300. package/dist/esm/api/types/DictateSessionBegin.d.mts +10 -0
  301. package/dist/esm/api/types/DictateSessionBegin.mjs +2 -0
  302. package/dist/esm/api/types/DictateSessionEnd.d.mts +16 -0
  303. package/dist/esm/api/types/DictateSessionEnd.mjs +2 -0
  304. package/dist/esm/api/types/DictateSpeechEnd.d.mts +6 -0
  305. package/dist/esm/api/types/DictateSpeechEnd.mjs +2 -0
  306. package/dist/esm/api/types/DictateSpeechStart.d.mts +6 -0
  307. package/dist/esm/api/types/DictateSpeechStart.mjs +2 -0
  308. package/dist/esm/api/types/DictateStreamingContext.d.mts +9 -0
  309. package/dist/esm/api/types/DictateStreamingContext.mjs +2 -0
  310. package/dist/esm/api/types/DictateStreamingCorrection.d.mts +17 -0
  311. package/dist/esm/api/types/DictateStreamingCorrection.mjs +8 -0
  312. package/dist/esm/api/types/DictateStreamingStyle.d.mts +44 -0
  313. package/dist/esm/api/types/DictateStreamingStyle.mjs +18 -0
  314. package/dist/esm/api/types/DictateStreamingUsage.d.mts +24 -0
  315. package/dist/esm/api/types/DictateStreamingUsage.mjs +2 -0
  316. package/dist/esm/api/types/DictateStreamingVocabularyEntry.d.mts +11 -0
  317. package/dist/esm/api/types/DictateStreamingVocabularyEntry.mjs +2 -0
  318. package/dist/esm/api/types/DictateStyle.d.mts +13 -0
  319. package/dist/esm/api/types/DictateStyle.mjs +2 -0
  320. package/dist/esm/api/types/DictateStylePreset.d.mts +15 -0
  321. package/dist/esm/api/types/DictateStylePreset.mjs +15 -0
  322. package/dist/esm/api/types/DictateTranscriptFinal.d.mts +18 -0
  323. package/dist/esm/api/types/DictateTranscriptFinal.mjs +2 -0
  324. package/dist/esm/api/types/DictateTranscriptPartial.d.mts +15 -0
  325. package/dist/esm/api/types/DictateTranscriptPartial.mjs +2 -0
  326. package/dist/esm/api/types/DictateUsage.d.mts +13 -0
  327. package/dist/esm/api/types/DictateUsage.mjs +2 -0
  328. package/dist/esm/api/types/DictateVadSpeechEnd.d.mts +9 -0
  329. package/dist/esm/api/types/DictateVadSpeechEnd.mjs +2 -0
  330. package/dist/esm/api/types/DictateVadSpeechStart.d.mts +9 -0
  331. package/dist/esm/api/types/DictateVadSpeechStart.mjs +2 -0
  332. package/dist/esm/api/types/DictateVocabulary.d.mts +5 -0
  333. package/dist/esm/api/types/DictateVocabulary.mjs +2 -0
  334. package/dist/esm/api/types/DictateVocabularyEntry.d.mts +11 -0
  335. package/dist/esm/api/types/DictateVocabularyEntry.mjs +2 -0
  336. package/dist/esm/api/types/VoiceCloningConfigureConnection.d.mts +0 -7
  337. package/dist/esm/api/types/VoiceLibraryCreateData.d.mts +0 -2
  338. package/dist/esm/api/types/VoiceLibraryDetail.d.mts +1 -1
  339. package/dist/esm/api/types/index.d.mts +48 -0
  340. package/dist/esm/api/types/index.mjs +48 -0
  341. package/dist/esm/version.d.mts +1 -1
  342. package/dist/esm/version.mjs +1 -1
  343. package/package.json +37 -1
  344. package/reference.md +319 -2
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "sarvamai",
46
- "X-Fern-SDK-Version": "1.1.18",
47
- "User-Agent": "sarvamai/1.1.18",
46
+ "X-Fern-SDK-Version": "1.1.19-alpha.2",
47
+ "User-Agent": "sarvamai/1.1.19-alpha.2",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1,6 +1,8 @@
1
1
  import { ChatClient } from "./api/resources/chat/client/Client.js";
2
2
  import { ChatCompletionClient } from "./api/resources/chatCompletion/client/Client.js";
3
3
  import { DecisionsClient } from "./api/resources/decisions/client/Client.js";
4
+ import { DictateClient } from "./api/resources/dictate/client/Client.js";
5
+ import { DictateStreamingClient } from "./api/resources/dictateStreaming/client/Client.js";
4
6
  import { DocAiClient } from "./api/resources/docAi/client/Client.js";
5
7
  import { DocumentIntelligenceClient } from "./api/resources/documentIntelligence/client/Client.js";
6
8
  import { DocumentTranslationClient } from "./api/resources/documentTranslation/client/Client.js";
@@ -42,9 +44,11 @@ export declare class SarvamAIClient {
42
44
  protected _responses: ResponsesClient | undefined;
43
45
  protected _chatCompletion: ChatCompletionClient | undefined;
44
46
  protected _decisions: DecisionsClient | undefined;
47
+ protected _dictate: DictateClient | undefined;
45
48
  protected _speechToTextStreaming: SpeechToTextStreamingClient | undefined;
46
49
  protected _speechToTextTranslateStreaming: SpeechToTextTranslateStreamingClient | undefined;
47
50
  protected _speechToTextRealtimeStreaming: SpeechToTextRealtimeStreamingClient | undefined;
51
+ protected _dictateStreaming: DictateStreamingClient | undefined;
48
52
  protected _textToSpeechStreaming: TextToSpeechStreamingClient | undefined;
49
53
  protected _voiceCloningStreaming: VoiceCloningStreamingClient | undefined;
50
54
  constructor(options?: SarvamAIClient.Options);
@@ -63,9 +67,11 @@ export declare class SarvamAIClient {
63
67
  get responses(): ResponsesClient;
64
68
  get chatCompletion(): ChatCompletionClient;
65
69
  get decisions(): DecisionsClient;
70
+ get dictate(): DictateClient;
66
71
  get speechToTextStreaming(): SpeechToTextStreamingClient;
67
72
  get speechToTextTranslateStreaming(): SpeechToTextTranslateStreamingClient;
68
73
  get speechToTextRealtimeStreaming(): SpeechToTextRealtimeStreamingClient;
74
+ get dictateStreaming(): DictateStreamingClient;
69
75
  get textToSpeechStreaming(): TextToSpeechStreamingClient;
70
76
  get voiceCloningStreaming(): VoiceCloningStreamingClient;
71
77
  }
@@ -5,23 +5,25 @@ exports.SarvamAIClient = void 0;
5
5
  const Client_js_1 = require("./api/resources/chat/client/Client.js");
6
6
  const Client_js_2 = require("./api/resources/chatCompletion/client/Client.js");
7
7
  const Client_js_3 = require("./api/resources/decisions/client/Client.js");
8
- const Client_js_4 = require("./api/resources/docAi/client/Client.js");
9
- const Client_js_5 = require("./api/resources/documentIntelligence/client/Client.js");
10
- const Client_js_6 = require("./api/resources/documentTranslation/client/Client.js");
11
- const Client_js_7 = require("./api/resources/dubbing/client/Client.js");
12
- const Client_js_8 = require("./api/resources/pronunciationDictionary/client/Client.js");
13
- const Client_js_9 = require("./api/resources/responses/client/Client.js");
14
- const Client_js_10 = require("./api/resources/speechToText/client/Client.js");
15
- const Client_js_11 = require("./api/resources/speechToTextJob/client/Client.js");
16
- const Client_js_12 = require("./api/resources/speechToTextRealtimeStreaming/client/Client.js");
17
- const Client_js_13 = require("./api/resources/speechToTextStreaming/client/Client.js");
18
- const Client_js_14 = require("./api/resources/speechToTextTranslateJob/client/Client.js");
19
- const Client_js_15 = require("./api/resources/speechToTextTranslateStreaming/client/Client.js");
20
- const Client_js_16 = require("./api/resources/text/client/Client.js");
21
- const Client_js_17 = require("./api/resources/textToSpeech/client/Client.js");
22
- const Client_js_18 = require("./api/resources/textToSpeechStreaming/client/Client.js");
23
- const Client_js_19 = require("./api/resources/voiceCloning/client/Client.js");
24
- const Client_js_20 = require("./api/resources/voiceCloningStreaming/client/Client.js");
8
+ const Client_js_4 = require("./api/resources/dictate/client/Client.js");
9
+ const Client_js_5 = require("./api/resources/dictateStreaming/client/Client.js");
10
+ const Client_js_6 = require("./api/resources/docAi/client/Client.js");
11
+ const Client_js_7 = require("./api/resources/documentIntelligence/client/Client.js");
12
+ const Client_js_8 = require("./api/resources/documentTranslation/client/Client.js");
13
+ const Client_js_9 = require("./api/resources/dubbing/client/Client.js");
14
+ const Client_js_10 = require("./api/resources/pronunciationDictionary/client/Client.js");
15
+ const Client_js_11 = require("./api/resources/responses/client/Client.js");
16
+ const Client_js_12 = require("./api/resources/speechToText/client/Client.js");
17
+ const Client_js_13 = require("./api/resources/speechToTextJob/client/Client.js");
18
+ const Client_js_14 = require("./api/resources/speechToTextRealtimeStreaming/client/Client.js");
19
+ const Client_js_15 = require("./api/resources/speechToTextStreaming/client/Client.js");
20
+ const Client_js_16 = require("./api/resources/speechToTextTranslateJob/client/Client.js");
21
+ const Client_js_17 = require("./api/resources/speechToTextTranslateStreaming/client/Client.js");
22
+ const Client_js_18 = require("./api/resources/text/client/Client.js");
23
+ const Client_js_19 = require("./api/resources/textToSpeech/client/Client.js");
24
+ const Client_js_20 = require("./api/resources/textToSpeechStreaming/client/Client.js");
25
+ const Client_js_21 = require("./api/resources/voiceCloning/client/Client.js");
26
+ const Client_js_22 = require("./api/resources/voiceCloningStreaming/client/Client.js");
25
27
  const BaseClient_js_1 = require("./BaseClient.js");
26
28
  class SarvamAIClient {
27
29
  constructor(options = {}) {
@@ -29,31 +31,31 @@ class SarvamAIClient {
29
31
  }
30
32
  get dubbing() {
31
33
  var _a;
32
- return ((_a = this._dubbing) !== null && _a !== void 0 ? _a : (this._dubbing = new Client_js_7.DubbingClient(this._options)));
34
+ return ((_a = this._dubbing) !== null && _a !== void 0 ? _a : (this._dubbing = new Client_js_9.DubbingClient(this._options)));
33
35
  }
34
36
  get documentTranslation() {
35
37
  var _a;
36
- return ((_a = this._documentTranslation) !== null && _a !== void 0 ? _a : (this._documentTranslation = new Client_js_6.DocumentTranslationClient(this._options)));
38
+ return ((_a = this._documentTranslation) !== null && _a !== void 0 ? _a : (this._documentTranslation = new Client_js_8.DocumentTranslationClient(this._options)));
37
39
  }
38
40
  get text() {
39
41
  var _a;
40
- return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = new Client_js_16.TextClient(this._options)));
42
+ return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = new Client_js_18.TextClient(this._options)));
41
43
  }
42
44
  get speechToText() {
43
45
  var _a;
44
- return ((_a = this._speechToText) !== null && _a !== void 0 ? _a : (this._speechToText = new Client_js_10.SpeechToTextClient(this._options)));
46
+ return ((_a = this._speechToText) !== null && _a !== void 0 ? _a : (this._speechToText = new Client_js_12.SpeechToTextClient(this._options)));
45
47
  }
46
48
  get textToSpeech() {
47
49
  var _a;
48
- return ((_a = this._textToSpeech) !== null && _a !== void 0 ? _a : (this._textToSpeech = new Client_js_17.TextToSpeechClient(this._options)));
50
+ return ((_a = this._textToSpeech) !== null && _a !== void 0 ? _a : (this._textToSpeech = new Client_js_19.TextToSpeechClient(this._options)));
49
51
  }
50
52
  get voiceCloning() {
51
53
  var _a;
52
- return ((_a = this._voiceCloning) !== null && _a !== void 0 ? _a : (this._voiceCloning = new Client_js_19.VoiceCloningClient(this._options)));
54
+ return ((_a = this._voiceCloning) !== null && _a !== void 0 ? _a : (this._voiceCloning = new Client_js_21.VoiceCloningClient(this._options)));
53
55
  }
54
56
  get pronunciationDictionary() {
55
57
  var _a;
56
- return ((_a = this._pronunciationDictionary) !== null && _a !== void 0 ? _a : (this._pronunciationDictionary = new Client_js_8.PronunciationDictionaryClient(this._options)));
58
+ return ((_a = this._pronunciationDictionary) !== null && _a !== void 0 ? _a : (this._pronunciationDictionary = new Client_js_10.PronunciationDictionaryClient(this._options)));
57
59
  }
58
60
  get chat() {
59
61
  var _a;
@@ -61,23 +63,23 @@ class SarvamAIClient {
61
63
  }
62
64
  get speechToTextJob() {
63
65
  var _a;
64
- return ((_a = this._speechToTextJob) !== null && _a !== void 0 ? _a : (this._speechToTextJob = new Client_js_11.SpeechToTextJobClient(this._options)));
66
+ return ((_a = this._speechToTextJob) !== null && _a !== void 0 ? _a : (this._speechToTextJob = new Client_js_13.SpeechToTextJobClient(this._options)));
65
67
  }
66
68
  get speechToTextTranslateJob() {
67
69
  var _a;
68
- return ((_a = this._speechToTextTranslateJob) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateJob = new Client_js_14.SpeechToTextTranslateJobClient(this._options)));
70
+ return ((_a = this._speechToTextTranslateJob) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateJob = new Client_js_16.SpeechToTextTranslateJobClient(this._options)));
69
71
  }
70
72
  get documentIntelligence() {
71
73
  var _a;
72
- return ((_a = this._documentIntelligence) !== null && _a !== void 0 ? _a : (this._documentIntelligence = new Client_js_5.DocumentIntelligenceClient(this._options)));
74
+ return ((_a = this._documentIntelligence) !== null && _a !== void 0 ? _a : (this._documentIntelligence = new Client_js_7.DocumentIntelligenceClient(this._options)));
73
75
  }
74
76
  get docAi() {
75
77
  var _a;
76
- return ((_a = this._docAi) !== null && _a !== void 0 ? _a : (this._docAi = new Client_js_4.DocAiClient(this._options)));
78
+ return ((_a = this._docAi) !== null && _a !== void 0 ? _a : (this._docAi = new Client_js_6.DocAiClient(this._options)));
77
79
  }
78
80
  get responses() {
79
81
  var _a;
80
- return ((_a = this._responses) !== null && _a !== void 0 ? _a : (this._responses = new Client_js_9.ResponsesClient(this._options)));
82
+ return ((_a = this._responses) !== null && _a !== void 0 ? _a : (this._responses = new Client_js_11.ResponsesClient(this._options)));
81
83
  }
82
84
  get chatCompletion() {
83
85
  var _a;
@@ -87,25 +89,33 @@ class SarvamAIClient {
87
89
  var _a;
88
90
  return ((_a = this._decisions) !== null && _a !== void 0 ? _a : (this._decisions = new Client_js_3.DecisionsClient(this._options)));
89
91
  }
92
+ get dictate() {
93
+ var _a;
94
+ return ((_a = this._dictate) !== null && _a !== void 0 ? _a : (this._dictate = new Client_js_4.DictateClient(this._options)));
95
+ }
90
96
  get speechToTextStreaming() {
91
97
  var _a;
92
- return ((_a = this._speechToTextStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextStreaming = new Client_js_13.SpeechToTextStreamingClient(this._options)));
98
+ return ((_a = this._speechToTextStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextStreaming = new Client_js_15.SpeechToTextStreamingClient(this._options)));
93
99
  }
94
100
  get speechToTextTranslateStreaming() {
95
101
  var _a;
96
- return ((_a = this._speechToTextTranslateStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateStreaming = new Client_js_15.SpeechToTextTranslateStreamingClient(this._options)));
102
+ return ((_a = this._speechToTextTranslateStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextTranslateStreaming = new Client_js_17.SpeechToTextTranslateStreamingClient(this._options)));
97
103
  }
98
104
  get speechToTextRealtimeStreaming() {
99
105
  var _a;
100
- return ((_a = this._speechToTextRealtimeStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextRealtimeStreaming = new Client_js_12.SpeechToTextRealtimeStreamingClient(this._options)));
106
+ return ((_a = this._speechToTextRealtimeStreaming) !== null && _a !== void 0 ? _a : (this._speechToTextRealtimeStreaming = new Client_js_14.SpeechToTextRealtimeStreamingClient(this._options)));
107
+ }
108
+ get dictateStreaming() {
109
+ var _a;
110
+ return ((_a = this._dictateStreaming) !== null && _a !== void 0 ? _a : (this._dictateStreaming = new Client_js_5.DictateStreamingClient(this._options)));
101
111
  }
102
112
  get textToSpeechStreaming() {
103
113
  var _a;
104
- return ((_a = this._textToSpeechStreaming) !== null && _a !== void 0 ? _a : (this._textToSpeechStreaming = new Client_js_18.TextToSpeechStreamingClient(this._options)));
114
+ return ((_a = this._textToSpeechStreaming) !== null && _a !== void 0 ? _a : (this._textToSpeechStreaming = new Client_js_20.TextToSpeechStreamingClient(this._options)));
105
115
  }
106
116
  get voiceCloningStreaming() {
107
117
  var _a;
108
- return ((_a = this._voiceCloningStreaming) !== null && _a !== void 0 ? _a : (this._voiceCloningStreaming = new Client_js_20.VoiceCloningStreamingClient(this._options)));
118
+ return ((_a = this._voiceCloningStreaming) !== null && _a !== void 0 ? _a : (this._voiceCloningStreaming = new Client_js_22.VoiceCloningStreamingClient(this._options)));
109
119
  }
110
120
  }
111
121
  exports.SarvamAIClient = SarvamAIClient;
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ export declare class LengthRequiredError extends errors.SarvamAIError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
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
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.LengthRequiredError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class LengthRequiredError extends errors.SarvamAIError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "LengthRequiredError",
43
+ statusCode: 411,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.LengthRequiredError = LengthRequiredError;
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as SarvamAI from "../index.js";
4
+ export declare class MethodNotAllowedError extends errors.SarvamAIError {
5
+ constructor(body: SarvamAI.V2ErrorResponse, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
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
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.MethodNotAllowedError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class MethodNotAllowedError extends errors.SarvamAIError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "MethodNotAllowedError",
43
+ statusCode: 405,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.MethodNotAllowedError = MethodNotAllowedError;
@@ -0,0 +1,5 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ export declare class RequestTimeoutError extends errors.SarvamAIError {
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
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
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.RequestTimeoutError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class RequestTimeoutError extends errors.SarvamAIError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "RequestTimeoutError",
43
+ statusCode: 408,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.RequestTimeoutError = RequestTimeoutError;
@@ -5,8 +5,11 @@ export * from "./ContentTooLargeError.js";
5
5
  export * from "./ForbiddenError.js";
6
6
  export * from "./GatewayTimeoutError.js";
7
7
  export * from "./InternalServerError.js";
8
+ export * from "./LengthRequiredError.js";
9
+ export * from "./MethodNotAllowedError.js";
8
10
  export * from "./NotFoundError.js";
9
11
  export * from "./PaymentRequiredError.js";
12
+ export * from "./RequestTimeoutError.js";
10
13
  export * from "./ServiceUnavailableError.js";
11
14
  export * from "./TooManyRequestsError.js";
12
15
  export * from "./UnauthorizedError.js";
@@ -21,8 +21,11 @@ __exportStar(require("./ContentTooLargeError.js"), exports);
21
21
  __exportStar(require("./ForbiddenError.js"), exports);
22
22
  __exportStar(require("./GatewayTimeoutError.js"), exports);
23
23
  __exportStar(require("./InternalServerError.js"), exports);
24
+ __exportStar(require("./LengthRequiredError.js"), exports);
25
+ __exportStar(require("./MethodNotAllowedError.js"), exports);
24
26
  __exportStar(require("./NotFoundError.js"), exports);
25
27
  __exportStar(require("./PaymentRequiredError.js"), exports);
28
+ __exportStar(require("./RequestTimeoutError.js"), exports);
26
29
  __exportStar(require("./ServiceUnavailableError.js"), exports);
27
30
  __exportStar(require("./TooManyRequestsError.js"), exports);
28
31
  __exportStar(require("./UnauthorizedError.js"), exports);
@@ -0,0 +1,78 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as SarvamAI from "../../../index.js";
5
+ import { JobsClient } from "../resources/jobs/client/Client.js";
6
+ export declare namespace DictateClient {
7
+ type Options = BaseClientOptions;
8
+ interface RequestOptions extends BaseRequestOptions {
9
+ }
10
+ }
11
+ export declare class DictateClient {
12
+ protected readonly _options: NormalizedClientOptionsWithAuth<DictateClient.Options>;
13
+ protected _jobs: JobsClient | undefined;
14
+ constructor(options?: DictateClient.Options);
15
+ get jobs(): JobsClient;
16
+ /**
17
+ * Turns a recording of up to 30 seconds into text a person can paste, and returns it in the same response.
18
+ *
19
+ * Each call returns two texts:
20
+ *
21
+ * - `transcript`: the words that speech recognition heard, unchanged.
22
+ * - `text`: the finished version, with punctuation, no fillers or false starts, numbers as digits, your names spelled your way, and your `style.rules` applied.
23
+ *
24
+ * Add `output_rules` to also get one `output` made from the whole recording, such as a summary or a JSON record.
25
+ *
26
+ * The finishing step never fails the call. If it fails or is too slow, `text` is the raw transcript and `degraded` tells you why.
27
+ *
28
+ * **Other routes:** for a recording up to 1 hour, use `POST /v2/dictate/jobs`. For live audio, use the `/v2/dictate/ws` WebSocket. For recipes and how-to guides, see [Dictate best practices](/api/api-guides-tutorials/dictate/best-practices).
29
+ *
30
+ * **Good to know**
31
+ *
32
+ * - Send `multipart/form-data`. `style`, `vocabulary` and `context` are JSON text in a form part. `language_code`, `mode`, `output_rules` and `model` are plain text.
33
+ * - Leave a field out to keep its default. `null`, an unknown field, a repeated field, or an empty `style`, `vocabulary`, `context`, `model` or `language_code` part returns `400`.
34
+ * - Character limits count characters, not bytes. Each form part other than `file` can be at most 1 MiB.
35
+ * - Every result names its snapshot in `model`. Pass `model` to pin a dated snapshot.
36
+ * - Every response has an `x-request-id` header. Send it to support if you report a problem.
37
+ *
38
+ * @param {SarvamAI.DictateRequest} request
39
+ * @param {DictateClient.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link SarvamAI.BadRequestError}
42
+ * @throws {@link SarvamAI.ForbiddenError}
43
+ * @throws {@link SarvamAI.MethodNotAllowedError}
44
+ * @throws {@link SarvamAI.RequestTimeoutError}
45
+ * @throws {@link SarvamAI.ContentTooLargeError}
46
+ * @throws {@link SarvamAI.TooManyRequestsError}
47
+ * @throws {@link SarvamAI.InternalServerError}
48
+ * @throws {@link SarvamAI.BadGatewayError}
49
+ * @throws {@link SarvamAI.ServiceUnavailableError}
50
+ *
51
+ * @example
52
+ * import { createReadStream } from "fs";
53
+ * await client.dictate.transcribe({
54
+ * file: fs.createReadStream("/path/to/your/file"),
55
+ * language_code: "hi-IN",
56
+ * mode: "codemix",
57
+ * style: {
58
+ * preset: "clean",
59
+ * rules: "Write each task as a bullet."
60
+ * },
61
+ * vocabulary: [{
62
+ * word: "Zentrix",
63
+ * sounds_like: ["Centrix"],
64
+ * description: "Our billing product"
65
+ * }]
66
+ * })
67
+ *
68
+ * @example
69
+ * import { createReadStream } from "fs";
70
+ * await client.dictate.transcribe({
71
+ * file: fs.createReadStream("/path/to/your/file"),
72
+ * language_code: "en-IN",
73
+ * output_rules: "Return JSON: {\"medicine\": string | null (the medicine the doctor prescribes), \"follow_up_days\": integer | null (days until the next visit)}. Write null when it was not said."
74
+ * })
75
+ */
76
+ transcribe(request: SarvamAI.DictateRequest, requestOptions?: DictateClient.RequestOptions): core.HttpResponsePromise<SarvamAI.DictateResponse>;
77
+ private __transcribe;
78
+ }