@deepgram/sdk 3.0.0-alpha.9 → 3.0.0-beta.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 (187) hide show
  1. package/README.md +240 -99
  2. package/dist/main/DeepgramClient.d.ts +2 -7
  3. package/dist/main/DeepgramClient.d.ts.map +1 -1
  4. package/dist/main/DeepgramClient.js +5 -28
  5. package/dist/main/DeepgramClient.js.map +1 -1
  6. package/dist/main/index.d.ts +5 -0
  7. package/dist/main/index.d.ts.map +1 -1
  8. package/dist/main/index.js +9 -2
  9. package/dist/main/index.js.map +1 -1
  10. package/dist/main/lib/constants.d.ts +4 -8
  11. package/dist/main/lib/constants.d.ts.map +1 -1
  12. package/dist/main/lib/constants.js +5 -1
  13. package/dist/main/lib/constants.js.map +1 -1
  14. package/dist/main/lib/helpers.d.ts.map +1 -1
  15. package/dist/main/lib/helpers.js +5 -5
  16. package/dist/main/lib/helpers.js.map +1 -1
  17. package/dist/main/lib/types/DeepgramClientOptions.d.ts +6 -1
  18. package/dist/main/lib/types/DeepgramClientOptions.d.ts.map +1 -1
  19. package/dist/main/lib/types/Fetch.d.ts +6 -4
  20. package/dist/main/lib/types/Fetch.d.ts.map +1 -1
  21. package/dist/main/lib/types/GetProjectBalancesResponse.d.ts +1 -1
  22. package/dist/main/lib/types/GetProjectBalancesResponse.d.ts.map +1 -1
  23. package/dist/main/lib/types/GetProjectInvitesResponse.d.ts +1 -1
  24. package/dist/main/lib/types/GetProjectInvitesResponse.d.ts.map +1 -1
  25. package/dist/main/lib/types/GetProjectKeysResponse.d.ts +1 -1
  26. package/dist/main/lib/types/GetProjectKeysResponse.d.ts.map +1 -1
  27. package/dist/main/lib/types/GetProjectMembersResponse.d.ts +1 -1
  28. package/dist/main/lib/types/GetProjectMembersResponse.d.ts.map +1 -1
  29. package/dist/main/lib/types/GetProjectUsageFieldsResponse.d.ts +1 -1
  30. package/dist/main/lib/types/GetProjectUsageFieldsResponse.d.ts.map +1 -1
  31. package/dist/main/lib/types/GetProjectUsageRequestsResponse.d.ts +1 -1
  32. package/dist/main/lib/types/GetProjectUsageRequestsResponse.d.ts.map +1 -1
  33. package/dist/main/lib/types/GetProjectUsageSummaryResponse.d.ts +1 -1
  34. package/dist/main/lib/types/GetProjectUsageSummaryResponse.d.ts.map +1 -1
  35. package/dist/main/lib/types/GetProjectsResponse.d.ts +1 -1
  36. package/dist/main/lib/types/GetProjectsResponse.d.ts.map +1 -1
  37. package/dist/main/lib/types/ListOnPremCredentialsResponse.d.ts +1 -1
  38. package/dist/main/lib/types/ListOnPremCredentialsResponse.d.ts.map +1 -1
  39. package/dist/main/lib/types/LiveTranscriptionEvent.d.ts +11 -15
  40. package/dist/main/lib/types/LiveTranscriptionEvent.d.ts.map +1 -1
  41. package/dist/main/lib/types/SyncPrerecordedResponse.d.ts +16 -16
  42. package/dist/main/lib/types/SyncPrerecordedResponse.d.ts.map +1 -1
  43. package/dist/main/lib/types/TranscriptionSchema.d.ts +2 -2
  44. package/dist/main/lib/types/TranscriptionSchema.d.ts.map +1 -1
  45. package/dist/main/lib/version.d.ts +1 -1
  46. package/dist/main/lib/version.js +1 -1
  47. package/dist/main/packages/AbstractClient.d.ts +16 -0
  48. package/dist/main/packages/AbstractClient.d.ts.map +1 -0
  49. package/dist/main/packages/AbstractClient.js +51 -0
  50. package/dist/main/packages/AbstractClient.js.map +1 -0
  51. package/dist/main/packages/AbstractRestfulClient.d.ts +14 -12
  52. package/dist/main/packages/AbstractRestfulClient.d.ts.map +1 -1
  53. package/dist/main/packages/AbstractRestfulClient.js +28 -23
  54. package/dist/main/packages/AbstractRestfulClient.js.map +1 -1
  55. package/dist/main/packages/AbstractWsClient.d.ts +10 -0
  56. package/dist/main/packages/AbstractWsClient.d.ts.map +1 -0
  57. package/dist/main/packages/AbstractWsClient.js +33 -0
  58. package/dist/main/packages/AbstractWsClient.js.map +1 -0
  59. package/dist/main/packages/ListenClient.d.ts +4 -7
  60. package/dist/main/packages/ListenClient.d.ts.map +1 -1
  61. package/dist/main/packages/ListenClient.js +6 -10
  62. package/dist/main/packages/ListenClient.js.map +1 -1
  63. package/dist/main/packages/LiveClient.d.ts +10 -7
  64. package/dist/main/packages/LiveClient.d.ts.map +1 -1
  65. package/dist/main/packages/LiveClient.js +24 -15
  66. package/dist/main/packages/LiveClient.js.map +1 -1
  67. package/dist/main/packages/ManageClient.d.ts.map +1 -1
  68. package/dist/main/packages/ManageClient.js +22 -66
  69. package/dist/main/packages/ManageClient.js.map +1 -1
  70. package/dist/main/packages/OnPremClient.d.ts.map +1 -1
  71. package/dist/main/packages/OnPremClient.js +4 -12
  72. package/dist/main/packages/OnPremClient.js.map +1 -1
  73. package/dist/main/packages/PrerecordedClient.d.ts.map +1 -1
  74. package/dist/main/packages/PrerecordedClient.js +4 -12
  75. package/dist/main/packages/PrerecordedClient.js.map +1 -1
  76. package/dist/main/packages/index.d.ts +9 -0
  77. package/dist/main/packages/index.d.ts.map +1 -0
  78. package/dist/main/packages/index.js +20 -0
  79. package/dist/main/packages/index.js.map +1 -0
  80. package/dist/module/DeepgramClient.d.ts +2 -7
  81. package/dist/module/DeepgramClient.d.ts.map +1 -1
  82. package/dist/module/DeepgramClient.js +5 -28
  83. package/dist/module/DeepgramClient.js.map +1 -1
  84. package/dist/module/index.d.ts +5 -0
  85. package/dist/module/index.d.ts.map +1 -1
  86. package/dist/module/index.js +6 -1
  87. package/dist/module/index.js.map +1 -1
  88. package/dist/module/lib/constants.d.ts +4 -8
  89. package/dist/module/lib/constants.d.ts.map +1 -1
  90. package/dist/module/lib/constants.js +4 -0
  91. package/dist/module/lib/constants.js.map +1 -1
  92. package/dist/module/lib/helpers.d.ts.map +1 -1
  93. package/dist/module/lib/helpers.js +2 -5
  94. package/dist/module/lib/helpers.js.map +1 -1
  95. package/dist/module/lib/types/DeepgramClientOptions.d.ts +6 -1
  96. package/dist/module/lib/types/DeepgramClientOptions.d.ts.map +1 -1
  97. package/dist/module/lib/types/Fetch.d.ts +6 -4
  98. package/dist/module/lib/types/Fetch.d.ts.map +1 -1
  99. package/dist/module/lib/types/GetProjectBalancesResponse.d.ts +1 -1
  100. package/dist/module/lib/types/GetProjectBalancesResponse.d.ts.map +1 -1
  101. package/dist/module/lib/types/GetProjectInvitesResponse.d.ts +1 -1
  102. package/dist/module/lib/types/GetProjectInvitesResponse.d.ts.map +1 -1
  103. package/dist/module/lib/types/GetProjectKeysResponse.d.ts +1 -1
  104. package/dist/module/lib/types/GetProjectKeysResponse.d.ts.map +1 -1
  105. package/dist/module/lib/types/GetProjectMembersResponse.d.ts +1 -1
  106. package/dist/module/lib/types/GetProjectMembersResponse.d.ts.map +1 -1
  107. package/dist/module/lib/types/GetProjectUsageFieldsResponse.d.ts +1 -1
  108. package/dist/module/lib/types/GetProjectUsageFieldsResponse.d.ts.map +1 -1
  109. package/dist/module/lib/types/GetProjectUsageRequestsResponse.d.ts +1 -1
  110. package/dist/module/lib/types/GetProjectUsageRequestsResponse.d.ts.map +1 -1
  111. package/dist/module/lib/types/GetProjectUsageSummaryResponse.d.ts +1 -1
  112. package/dist/module/lib/types/GetProjectUsageSummaryResponse.d.ts.map +1 -1
  113. package/dist/module/lib/types/GetProjectsResponse.d.ts +1 -1
  114. package/dist/module/lib/types/GetProjectsResponse.d.ts.map +1 -1
  115. package/dist/module/lib/types/ListOnPremCredentialsResponse.d.ts +1 -1
  116. package/dist/module/lib/types/ListOnPremCredentialsResponse.d.ts.map +1 -1
  117. package/dist/module/lib/types/LiveTranscriptionEvent.d.ts +11 -15
  118. package/dist/module/lib/types/LiveTranscriptionEvent.d.ts.map +1 -1
  119. package/dist/module/lib/types/SyncPrerecordedResponse.d.ts +16 -16
  120. package/dist/module/lib/types/SyncPrerecordedResponse.d.ts.map +1 -1
  121. package/dist/module/lib/types/TranscriptionSchema.d.ts +2 -2
  122. package/dist/module/lib/types/TranscriptionSchema.d.ts.map +1 -1
  123. package/dist/module/lib/version.d.ts +1 -1
  124. package/dist/module/lib/version.js +1 -1
  125. package/dist/module/packages/AbstractClient.d.ts +16 -0
  126. package/dist/module/packages/AbstractClient.d.ts.map +1 -0
  127. package/dist/module/packages/AbstractClient.js +47 -0
  128. package/dist/module/packages/AbstractClient.js.map +1 -0
  129. package/dist/module/packages/AbstractRestfulClient.d.ts +14 -12
  130. package/dist/module/packages/AbstractRestfulClient.d.ts.map +1 -1
  131. package/dist/module/packages/AbstractRestfulClient.js +29 -24
  132. package/dist/module/packages/AbstractRestfulClient.js.map +1 -1
  133. package/dist/module/packages/AbstractWsClient.d.ts +10 -0
  134. package/dist/module/packages/AbstractWsClient.d.ts.map +1 -0
  135. package/dist/module/packages/AbstractWsClient.js +29 -0
  136. package/dist/module/packages/AbstractWsClient.js.map +1 -0
  137. package/dist/module/packages/ListenClient.d.ts +4 -7
  138. package/dist/module/packages/ListenClient.d.ts.map +1 -1
  139. package/dist/module/packages/ListenClient.js +6 -10
  140. package/dist/module/packages/ListenClient.js.map +1 -1
  141. package/dist/module/packages/LiveClient.d.ts +10 -7
  142. package/dist/module/packages/LiveClient.d.ts.map +1 -1
  143. package/dist/module/packages/LiveClient.js +24 -15
  144. package/dist/module/packages/LiveClient.js.map +1 -1
  145. package/dist/module/packages/ManageClient.d.ts.map +1 -1
  146. package/dist/module/packages/ManageClient.js +22 -66
  147. package/dist/module/packages/ManageClient.js.map +1 -1
  148. package/dist/module/packages/OnPremClient.d.ts.map +1 -1
  149. package/dist/module/packages/OnPremClient.js +4 -12
  150. package/dist/module/packages/OnPremClient.js.map +1 -1
  151. package/dist/module/packages/PrerecordedClient.d.ts.map +1 -1
  152. package/dist/module/packages/PrerecordedClient.js +4 -12
  153. package/dist/module/packages/PrerecordedClient.js.map +1 -1
  154. package/dist/module/packages/index.d.ts +9 -0
  155. package/dist/module/packages/index.d.ts.map +1 -0
  156. package/dist/module/packages/index.js +9 -0
  157. package/dist/module/packages/index.js.map +1 -0
  158. package/dist/umd/deepgram.js +1 -1
  159. package/package.json +6 -1
  160. package/src/DeepgramClient.ts +5 -43
  161. package/src/index.ts +7 -1
  162. package/src/lib/constants.ts +6 -0
  163. package/src/lib/helpers.ts +2 -10
  164. package/src/lib/types/DeepgramClientOptions.ts +7 -1
  165. package/src/lib/types/Fetch.ts +15 -5
  166. package/src/lib/types/GetProjectBalancesResponse.ts +1 -1
  167. package/src/lib/types/GetProjectInvitesResponse.ts +1 -1
  168. package/src/lib/types/GetProjectKeysResponse.ts +1 -1
  169. package/src/lib/types/GetProjectMembersResponse.ts +1 -1
  170. package/src/lib/types/GetProjectUsageFieldsResponse.ts +1 -1
  171. package/src/lib/types/GetProjectUsageRequestsResponse.ts +1 -1
  172. package/src/lib/types/GetProjectUsageSummaryResponse.ts +1 -1
  173. package/src/lib/types/GetProjectsResponse.ts +1 -1
  174. package/src/lib/types/ListOnPremCredentialsResponse.ts +1 -1
  175. package/src/lib/types/LiveTranscriptionEvent.ts +11 -15
  176. package/src/lib/types/SyncPrerecordedResponse.ts +16 -16
  177. package/src/lib/types/TranscriptionSchema.ts +2 -2
  178. package/src/lib/version.ts +1 -1
  179. package/src/packages/AbstractClient.ts +57 -0
  180. package/src/packages/AbstractRestfulClient.ts +35 -26
  181. package/src/packages/AbstractWsClient.ts +42 -0
  182. package/src/packages/ListenClient.ts +6 -15
  183. package/src/packages/LiveClient.ts +29 -17
  184. package/src/packages/ManageClient.ts +22 -66
  185. package/src/packages/OnPremClient.ts +4 -12
  186. package/src/packages/PrerecordedClient.ts +4 -14
  187. package/src/packages/index.ts +8 -0
package/README.md CHANGED
@@ -1,85 +1,163 @@
1
- # Deepgram Node.js SDK
2
-
3
- [![Discord](https://dcbadge.vercel.app/api/server/xWRaCDBtW4?style=flat)](https://discord.gg/xWRaCDBtW4) [![CI](https://github.com/deepgram/node-sdk/actions/workflows/CI.yml/badge.svg)](https://github.com/deepgram/node-sdk/actions/workflows/CI.yml) [![npm (scoped)](https://img.shields.io/npm/v/@deepgram/sdk)](https://www.npmjs.com/package/@deepgram/sdk) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-rounded)](CODE_OF_CONDUCT.md)
4
-
5
- Official Node.js SDK for [Deepgram](https://www.deepgram.com/). Power your apps with world-class speech and Language AI models.
6
- > This SDK only supports hosted usage of api.deepgram.com.
7
-
8
- > ### Deprecated JS Browser SDK
9
- >
10
- > As of version 2.x, the JS Browser SDK was removed from the Node SDK and will become an independent Client SDK.
11
- > To use the older SDK, please `npm i @deepgram/sdk@1.2.1` and use `@deepgram/sdk/browser`.
12
-
13
- * [Deepgram Node.js SDK](#deepgram-nodejs-sdk)
14
- * [Getting an API Key](#getting-an-api-key)
15
- * [Installation](#installation)
16
- * [Constructor](#constructor)
17
- * [Transcription](#transcription)
18
- * [Remote Files](#remote-files)
19
- * [Local Files](#local-files)
20
- * [Live Audio](#live-audio)
21
- * [Projects](#projects)
22
- * [Get Projects](#get-projects)
23
- * [Get Project](#get-project)
24
- * [Update Project](#update-project)
25
- * [Delete Project](#delete-project)
26
- * [Keys](#keys)
27
- * [List Keys](#list-keys)
28
- * [Get Key](#get-key)
29
- * [Create Key](#create-key)
30
- * [Delete Key](#delete-key)
31
- * [Members](#members)
32
- * [Get Members](#get-members)
33
- * [Remove Member](#remove-member)
34
- * [Scopes](#scopes)
35
- * [Get Member Scopes](#get-member-scopes)
36
- * [Update Scope](#update-scope)
37
- * [Invitations](#invitations)
38
- * [List Invites](#list-invites)
39
- * [Send Invite](#send-invite)
40
- * [Delete Invite](#delete-invite)
41
- * [Leave Project](#leave-project)
42
- * [Usage](#usage)
43
- * [Get All Requests](#get-all-requests)
44
- * [Get Request](#get-request)
45
- * [Summarize Usage](#summarize-usage)
46
- * [Get Fields](#get-fields)
47
- * [Billing](#billing)
48
- * [Get All Balances](#get-all-balances)
49
- * [Get Balance](#get-balance)
50
- * [Development and Contributing](#development-and-contributing)
51
- * [Getting Help](#getting-help)
52
-
53
- # Getting an API Key
54
-
55
- 🔑 To access the Deepgram API you will need a [free Deepgram API Key](https://console.deepgram.com/signup?jump=keys).
1
+ # Deepgram JavaScript SDK
2
+
3
+ [![Discord](https://dcbadge.vercel.app/api/server/xWRaCDBtW4?style=flat)](https://discord.gg/xWRaCDBtW4) [![CI](https://github.com/deepgram/node-sdk/actions/workflows/CI.yml/badge.svg)](https://github.com/deepgram/node-sdk/actions/workflows/CI.yml) [![npm (scoped)](https://img.shields.io/npm/v/@deepgram/sdk)](https://www.npmjs.com/package/@deepgram/sdk) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?style=flat-rounded)](CODE_OF_CONDUCT.md)
4
+
5
+ Official JavaScript SDK for [Deepgram](https://www.deepgram.com/). Power your apps with world-class speech and Language AI models.
6
+
7
+ - [Installation](#installation)
8
+ - [UMD](#umd)
9
+ - [ESM](#esm)
10
+ - [Initialization](#initialization)
11
+ - [Getting an API Key](#getting-an-api-key)
12
+ - [Scoped Configuration](#scoped-configuration)
13
+ - [Rest requests in the browser](#rest-requests-in-the-browser)
14
+ - [Transcription](#transcription)
15
+ - [Remote Files](#remote-files)
16
+ - [Local Files](#local-files)
17
+ - [Live Audio](#live-audio)
18
+ - [Transcribing to captions](#transcribing-to-captions)
19
+ - [Projects](#projects)
20
+ - [Get Projects](#get-projects)
21
+ - [Get Project](#get-project)
22
+ - [Update Project](#update-project)
23
+ - [Delete Project](#delete-project)
24
+ - [Keys](#keys)
25
+ - [List Keys](#list-keys)
26
+ - [Get Key](#get-key)
27
+ - [Create Key](#create-key)
28
+ - [Delete Key](#delete-key)
29
+ - [Members](#members)
30
+ - [Get Members](#get-members)
31
+ - [Remove Member](#remove-member)
32
+ - [Scopes](#scopes)
33
+ - [Get Member Scopes](#get-member-scopes)
34
+ - [Update Scope](#update-scope)
35
+ - [Invitations](#invitations)
36
+ - [List Invites](#list-invites)
37
+ - [Send Invite](#send-invite)
38
+ - [Delete Invite](#delete-invite)
39
+ - [Leave Project](#leave-project)
40
+ - [Usage](#usage)
41
+ - [Get All Requests](#get-all-requests)
42
+ - [Get Request](#get-request)
43
+ - [Summarize Usage](#summarize-usage)
44
+ - [Get Fields](#get-fields)
45
+ - [Billing](#billing)
46
+ - [Get All Balances](#get-all-balances)
47
+ - [Get Balance](#get-balance)
48
+ - [On-Prem APIs](#on-prem-apis)
49
+ - [List On-Prem credentials](#list-on-prem-credentials)
50
+ - [Get On-Prem credentials](#get-on-prem-credentials)
51
+ - [Create On-Prem credentials](#create-on-prem-credentials)
52
+ - [Delete On-Prem credentials](#delete-on-prem-credentials)
53
+ - [Development and Contributing](#development-and-contributing)
54
+ - [Getting Help](#getting-help)
56
55
 
57
56
  # Installation
58
57
 
58
+ You can install this SDK directly from [npm](https://www.npmjs.com/package/@deepgram/sdk).
59
+
59
60
  ```bash
60
61
  npm install @deepgram/sdk
61
62
  # - or -
62
63
  # yarn add @deepgram/sdk
63
64
  ```
64
65
 
65
- # Constructor
66
+ ## UMD
67
+
68
+ You can now use plain `<script>`s to import deepgram from CDNs, like:
69
+
70
+ ```html
71
+ <script src="https://cdn.jsdelivr.net/npm/@deepgram/sdk"></script>
72
+ ```
73
+
74
+ or even:
75
+
76
+ ```html
77
+ <script src="https://unpkg.com/@deepgram/sdk"></script>
78
+ ```
79
+
80
+ Then you can use it from a global deepgram variable:
81
+
82
+ ```html
83
+ <script>
84
+ const { createClient } = deepgram;
85
+ const _deepgram = createClient("deepgram-api-key");
86
+
87
+ console.log("Deepgram Instance: ", _deepgram);
88
+ // ...
89
+ </script>
90
+ ```
91
+
92
+ ## ESM
93
+
94
+ You can now use type="module" `<script>`s to import deepgram from CDNs, like:
95
+
96
+ ```html
97
+ <script type="module">
98
+ import { createClient } from "https://cdn.jsdelivr.net/npm/@deepgram/sdk/+esm";
99
+ const deepgram = createClient("deepgram-api-key");
100
+
101
+ console.log("Deepgram Instance: ", deepgram);
102
+ // ...
103
+ </script>
104
+ ```
105
+
106
+ # Initialization
66
107
 
67
108
  ```js
68
- const { Deepgram } = require("@deepgram/sdk");
109
+ import { createClient } from "@deepgram/sdk";
69
110
  // - or -
70
- // import { Deepgram } from "@deepgram/sdk";
111
+ // const { createClient } = require("@deepgram/sdk");
71
112
 
72
- const deepgram = new Deepgram(DEEPGRAM_API_KEY);
113
+ const deepgram = createClient(DEEPGRAM_API_KEY);
73
114
  ```
74
115
 
116
+ ## Getting an API Key
117
+
118
+ 🔑 To access the Deepgram API you will need a [free Deepgram API Key](https://console.deepgram.com/signup?jump=keys).
119
+
120
+ # Scoped Configuration
121
+
122
+ A new feature is scoped configuration. You'll be able to configure various aspects of the SDK from the initialization.
123
+
124
+ ```js
125
+ import { createClient } from "@deepgram/sdk";
126
+ // - or -
127
+ // const { createClient } = require("@deepgram/sdk");
128
+
129
+ const deepgram = createClient(DEEPGRAM_API_KEY, {
130
+ global: { url: "https://api.beta.deepgram.com" },
131
+ // proxy: { url: "http://localhost:8080" }
132
+ });
133
+ ```
134
+
135
+ ## Rest requests in the browser
136
+
137
+ This SDK now works in the browser. If you'd like to make REST-based requests (pre-recorded transcription, on-premise, and management requests), then you'll need to use a proxy as we do not support custom CORS origins on our API. To set up your proxy, you configure the SDK like so:
138
+
139
+ ```js
140
+ import { createClient } from "@deepgram/sdk";
141
+
142
+ const deepgram = createClient("proxy", {
143
+ proxy: { url: "http://localhost:8080" },
144
+ });
145
+ ```
146
+
147
+ Your proxy service should replace the Authorization header with `Authorization: token <DEEPGRAM_API_KEY>` and return results verbatim to the SDK.
148
+
75
149
  # Transcription
76
150
 
77
151
  ## Remote Files
78
152
 
79
153
  ```js
80
- const response = await deepgram.transcription.preRecorded(
81
- { url: URL_OF_FILE },
82
- options
154
+ const { result, error } = await deepgram.listen.prerecorded.transcribeUrl(
155
+ {
156
+ url: "https://dpgr.am/spacewalk.wav",
157
+ },
158
+ {
159
+ model: "nova",
160
+ }
83
161
  );
84
162
  ```
85
163
 
@@ -88,12 +166,22 @@ const response = await deepgram.transcription.preRecorded(
88
166
  ## Local Files
89
167
 
90
168
  ```js
91
- const response = await deepgram.transcription.preRecorded(
169
+ const { result, error } = await deepgram.listen.prerecorded.transcribeFile(
170
+ fs.createReadStream("./examples/spacewalk.wav"),
92
171
  {
93
- stream: fs.createReadStream("/path/to/file"),
94
- mimetype: MIMETYPE_OF_FILE,
95
- },
96
- options
172
+ model: "nova",
173
+ }
174
+ );
175
+ ```
176
+
177
+ or
178
+
179
+ ```js
180
+ const { result, error } = await deepgram.listen.prerecorded.transcribeFile(
181
+ fs.readFileSync("./examples/spacewalk.wav"),
182
+ {
183
+ model: "nova",
184
+ }
97
185
  );
98
186
  ```
99
187
 
@@ -102,17 +190,43 @@ const response = await deepgram.transcription.preRecorded(
102
190
  ## Live Audio
103
191
 
104
192
  ```js
105
- const ws = dg.transcription.live(options);
193
+ const dgConnection = deepgram.listen.live({ model: "nova" });
194
+
195
+ dgConnection.on(LiveTranscriptionEvents.Open, () => {
196
+ dgConnection.on(LiveTranscriptionEvents.Transcript, (data) => {
197
+ console.log(data);
198
+ });
106
199
 
107
- // source.addListener('got-some-audio', async (event) => {
108
- ws.send(event);
109
- // })
200
+ source.addListener("got-some-audio", async (event) => {
201
+ dgConnection.send(event.raw_audio_data);
202
+ });
203
+ });
110
204
  ```
111
205
 
112
- See an example, here: [https://github.com/deepgram-devs/node-live-example](https://github.com/deepgram-devs/node-live-example).
206
+ To see an example, [check out our Node.js example](https://github.com/deepgram-devs/node-live-example) or our [Browser example](https://github.com/deepgram-devs/js-live-example).
113
207
 
114
208
  [See our API reference for more info](https://developers.deepgram.com/reference/streaming).
115
209
 
210
+ # Transcribing to captions
211
+
212
+ ```js
213
+ import { webvtt /* , srt */ } from "@deepgram/captions";
214
+
215
+ const { result, error } = await deepgram.listen.prerecorded.transcribeUrl(
216
+ {
217
+ url: "https://dpgr.am/spacewalk.wav",
218
+ },
219
+ {
220
+ model: "nova",
221
+ }
222
+ );
223
+
224
+ const vttOutput = webvtt(result);
225
+ // const srtOutput = srt(result);
226
+ ```
227
+
228
+ [See our standalone captions library for more information](https://github.com/deepgram/deepgram-node-captions).
229
+
116
230
  # Projects
117
231
 
118
232
  ## Get Projects
@@ -120,7 +234,7 @@ See an example, here: [https://github.com/deepgram-devs/node-live-example](https
120
234
  Returns all projects accessible by the API key.
121
235
 
122
236
  ```js
123
- const result = await deepgram.projects.list();
237
+ const { result, error } = await deepgram.manage.getProjects();
124
238
  ```
125
239
 
126
240
  [See our API reference for more info](https://developers.deepgram.com/reference/get-projects).
@@ -130,7 +244,7 @@ const result = await deepgram.projects.list();
130
244
  Retrieves a specific project based on the provided project_id.
131
245
 
132
246
  ```js
133
- const result = await deepgram.projects.get(project_id);
247
+ const { result, error } = await deepgram.manage.getProject(projectId);
134
248
  ```
135
249
 
136
250
  [See our API reference for more info](https://developers.deepgram.com/reference/get-project).
@@ -140,7 +254,7 @@ const result = await deepgram.projects.get(project_id);
140
254
  Update a project.
141
255
 
142
256
  ```js
143
- const result = await deepgram.projects.update(project_id, options);
257
+ const { result, error } = await deepgram.manage.updateProject(projectId, options);
144
258
  ```
145
259
 
146
260
  [See our API reference for more info](https://developers.deepgram.com/reference/update-project).
@@ -150,7 +264,7 @@ const result = await deepgram.projects.update(project_id, options);
150
264
  Delete a project.
151
265
 
152
266
  ```js
153
- await deepgram.projects.delete(project_id);
267
+ const { error } = await deepgram.manage.deleteProject(projectId);
154
268
  ```
155
269
 
156
270
  [See our API reference for more info](https://developers.deepgram.com/reference/delete-project).
@@ -162,7 +276,7 @@ await deepgram.projects.delete(project_id);
162
276
  Retrieves all keys associated with the provided project_id.
163
277
 
164
278
  ```js
165
- const result = await deepgram.keys.list(project_id);
279
+ const { result, error } = await deepgram.manage.getProjectKeys(projectId);
166
280
  ```
167
281
 
168
282
  [See our API reference for more info](https://developers.deepgram.com/reference/list-keys).
@@ -172,7 +286,7 @@ const result = await deepgram.keys.list(project_id);
172
286
  Retrieves a specific key associated with the provided project_id.
173
287
 
174
288
  ```js
175
- const result = await deepgram.keys.get(project_id, key_id);
289
+ const { result, error } = await deepgram.manage.getProjectKey(projectId, projectKeyId);
176
290
  ```
177
291
 
178
292
  [See our API reference for more info](https://developers.deepgram.com/reference/get-key).
@@ -182,8 +296,7 @@ const result = await deepgram.keys.get(project_id, key_id);
182
296
  Creates an API key with the provided scopes.
183
297
 
184
298
  ```js
185
- let scopes = ["member", "etc"];
186
- const result = await deepgram.keys.create(project_id, comment, scopes, options);
299
+ const { result, error } = await deepgram.manage.createProjectKey(projectId, options);
187
300
  ```
188
301
 
189
302
  [See our API reference for more info](https://developers.deepgram.com/reference/create-key).
@@ -193,7 +306,7 @@ const result = await deepgram.keys.create(project_id, comment, scopes, options);
193
306
  Deletes a specific key associated with the provided project_id.
194
307
 
195
308
  ```js
196
- await deepgram.keys.delete(project_id, key_id);
309
+ const { error } = await deepgram.manage.deleteProjectKey(projectId, projectKeyId);
197
310
  ```
198
311
 
199
312
  [See our API reference for more info](https://developers.deepgram.com/reference/delete-key).
@@ -205,7 +318,7 @@ await deepgram.keys.delete(project_id, key_id);
205
318
  Retrieves account objects for all of the accounts in the specified project_id.
206
319
 
207
320
  ```js
208
- const result = await deepgram.members.listMembers(project_id);
321
+ const { result, error } = await deepgram.manage.getProjectMembers(projectId);
209
322
  ```
210
323
 
211
324
  [See our API reference for more info](https://developers.deepgram.com/reference/get-members).
@@ -215,7 +328,7 @@ const result = await deepgram.members.listMembers(project_id);
215
328
  Removes member account for specified member_id.
216
329
 
217
330
  ```js
218
- const result = await deepgram.members.removeMember(project_id, member_id);
331
+ const { error } = await deepgram.manage.removeProjectMember(projectId, projectMemberId);
219
332
  ```
220
333
 
221
334
  [See our API reference for more info](https://developers.deepgram.com/reference/remove-member).
@@ -227,7 +340,7 @@ const result = await deepgram.members.removeMember(project_id, member_id);
227
340
  Retrieves scopes of the specified member in the specified project.
228
341
 
229
342
  ```js
230
- const result = await deepgram.scopes.get(project_id, member_id);
343
+ const { result, error } = await deepgram.manage.getProjectMemberScopes(projectId, projectMemberId);
231
344
  ```
232
345
 
233
346
  [See our API reference for more info](https://developers.deepgram.com/reference/get-member-scopes).
@@ -237,8 +350,11 @@ const result = await deepgram.scopes.get(project_id, member_id);
237
350
  Updates the scope for the specified member in the specified project.
238
351
 
239
352
  ```js
240
- let scope = "member:read";
241
- const result = await deepgram.scopes.update(project_id, member_id, scope);
353
+ const { result, error } = await deepgram.manage.updateProjectMemberScope(
354
+ projectId,
355
+ projectMemberId,
356
+ options
357
+ );
242
358
  ```
243
359
 
244
360
  [See our API reference for more info](https://developers.deepgram.com/reference/update-scope).
@@ -250,7 +366,7 @@ const result = await deepgram.scopes.update(project_id, member_id, scope);
250
366
  Retrieves all invitations associated with the provided project_id.
251
367
 
252
368
  ```js
253
- const result = await deepgram.invitations.list(project_id);
369
+ const { result, error } = await deepgram.manage.getProjectInvites(projectId);
254
370
  ```
255
371
 
256
372
  [See our API reference for more info](https://developers.deepgram.com/reference/list-invites).
@@ -260,7 +376,7 @@ const result = await deepgram.invitations.list(project_id);
260
376
  Sends an invitation to the provided email address.
261
377
 
262
378
  ```js
263
- const result = await deepgram.invitation.send(project_id, options);
379
+ const { result, error } = await deepgram.manage.sendProjectInvite(projectId, options);
264
380
  ```
265
381
 
266
382
  [See our API reference for more info](https://developers.deepgram.com/reference/send-invites).
@@ -270,8 +386,7 @@ const result = await deepgram.invitation.send(project_id, options);
270
386
  Removes the specified invitation from the project.
271
387
 
272
388
  ```js
273
- let email = "devrel@deepgram.com";
274
- const result = await deepgram.invitation.delete(project_id, email);
389
+ const { error } = await deepgram.manage.deleteProjectInvite(projectId, email);
275
390
  ```
276
391
 
277
392
  [See our API reference for more info](https://developers.deepgram.com/reference/delete-invite).
@@ -281,7 +396,7 @@ const result = await deepgram.invitation.delete(project_id, email);
281
396
  Removes the authenticated user from the project.
282
397
 
283
398
  ```js
284
- const result = await deepgram.invitation.leave(project_id);
399
+ const { result, error } = await deepgram.manage.leaveProject(projectId);
285
400
  ```
286
401
 
287
402
  [See our API reference for more info](https://developers.deepgram.com/reference/leave-project).
@@ -293,7 +408,7 @@ const result = await deepgram.invitation.leave(project_id);
293
408
  Retrieves all requests associated with the provided project_id based on the provided options.
294
409
 
295
410
  ```js
296
- const result = await deepgram.usage.listRequests(project_id, options);
411
+ const { result, error } = await deepgram.manage.getProjectUsageRequest(projectId, requestId);
297
412
  ```
298
413
 
299
414
  [See our API reference for more info](https://developers.deepgram.com/reference/get-all-requests).
@@ -303,7 +418,7 @@ const result = await deepgram.usage.listRequests(project_id, options);
303
418
  Retrieves a specific request associated with the provided project_id.
304
419
 
305
420
  ```js
306
- const result = await deepgram.usage.getRequest(project_id, request_id);
421
+ const { result, error } = await deepgram.manage.getProjectUsageRequest(projectId, requestId);
307
422
  ```
308
423
 
309
424
  [See our API reference for more info](https://developers.deepgram.com/reference/get-request).
@@ -313,7 +428,7 @@ const result = await deepgram.usage.getRequest(project_id, request_id);
313
428
  Retrieves usage associated with the provided project_id based on the provided options.
314
429
 
315
430
  ```js
316
- const result = await deepgram.usage.getUsage(project_id, options);
431
+ const { result, error } = await deepgram.manage.getProjectUsageSummary(projectId, options);
317
432
  ```
318
433
 
319
434
  [See our API reference for more info](https://developers.deepgram.com/reference/summarize-usage).
@@ -323,7 +438,7 @@ const result = await deepgram.usage.getUsage(project_id, options);
323
438
  Lists the features, models, tags, languages, and processing method used for requests in the specified project.
324
439
 
325
440
  ```js
326
- const result = await deepgram.usage.getFields(project_id, options);
441
+ const { result, error } = await deepgram.manage.getProjectUsageFields(projectId, options);
327
442
  ```
328
443
 
329
444
  [See our API reference for more info](https://developers.deepgram.com/reference/get-fields).
@@ -335,7 +450,7 @@ const result = await deepgram.usage.getFields(project_id, options);
335
450
  Retrieves the list of balance info for the specified project.
336
451
 
337
452
  ```js
338
- const result = await deepgram.billing.listBalances(project_id);
453
+ const { result, error } = await deepgram.manage.getProjectBalances(projectId);
339
454
  ```
340
455
 
341
456
  [See our API reference for more info](https://developers.deepgram.com/reference/get-all-balances).
@@ -345,11 +460,37 @@ const result = await deepgram.billing.listBalances(project_id);
345
460
  Retrieves the balance info for the specified project and balance_id.
346
461
 
347
462
  ```js
348
- const result = await deepgram.billing.getBalance(project_id, balance_id);
463
+ const { result, error } = await deepgram.manage.getProjectBalance(projectId, balanceId);
349
464
  ```
350
465
 
351
466
  [See our API reference for more info](https://developers.deepgram.com/reference/get-balance).
352
467
 
468
+ # On-Prem APIs
469
+
470
+ ## List On-Prem credentials
471
+
472
+ ```js
473
+ const { result, error } = await deepgram.onprem.listCredentials(projectId);
474
+ ```
475
+
476
+ ## Get On-Prem credentials
477
+
478
+ ```js
479
+ const { result, error } = await deepgram.onprem.getCredentials(projectId, credentialId);
480
+ ```
481
+
482
+ ## Create On-Prem credentials
483
+
484
+ ```js
485
+ const { result, error } = await deepgram.onprem.createCredentials(projectId, options);
486
+ ```
487
+
488
+ ## Delete On-Prem credentials
489
+
490
+ ```js
491
+ const { result, error } = await deepgram.onprem.deleteCredentials(projectId, credentialId);
492
+ ```
493
+
353
494
  # Development and Contributing
354
495
 
355
496
  Interested in contributing? We ❤️ pull requests!
@@ -363,6 +504,6 @@ To make sure our community is safe for all, be sure to review and agree to our
363
504
  We love to hear from you so if you have questions, comments or find a bug in the
364
505
  project, let us know! You can either:
365
506
 
366
- - [Open an issue in this repository](https://github.com/deepgram/node-sdk/issues/new)
367
- - [Join the Deepgram Github Discussions Community](https://github.com/orgs/deepgram/discussions)
507
+ - [Open an issue in this repository](https://github.com/deepgram/deepgram-node-sdk/issues/new)
368
508
  - [Join the Deepgram Discord Community](https://discord.gg/xWRaCDBtW4)
509
+ - [Join the Deepgram Github Discussions Community](https://github.com/orgs/deepgram/discussions)
@@ -1,19 +1,14 @@
1
+ import { AbstractClient } from "./packages/AbstractClient";
1
2
  import { ListenClient } from "./packages/ListenClient";
2
3
  import { ManageClient } from "./packages/ManageClient";
3
4
  import { OnPremClient } from "./packages/OnPremClient";
4
- import type { DeepgramClientOptions } from "./lib/types/DeepgramClientOptions";
5
5
  /**
6
6
  * Deepgram Client.
7
7
  *
8
8
  * An isomorphic Javascript client for interacting with the Deepgram API.
9
9
  * @see https://developers.deepgram.com
10
10
  */
11
- export default class DeepgramClient {
12
- protected apiKey: string;
13
- protected key: string;
14
- protected baseUrl: URL;
15
- protected headers: Record<string, string>;
16
- constructor(apiKey: string, options?: DeepgramClientOptions | undefined);
11
+ export default class DeepgramClient extends AbstractClient {
17
12
  get listen(): ListenClient;
18
13
  get manage(): ManageClient;
19
14
  get onprem(): OnPremClient;
@@ -1 +1 @@
1
- {"version":3,"file":"DeepgramClient.d.ts","sourceRoot":"","sources":["../../src/DeepgramClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IAM/B,SAAS,CAAC,MAAM,EAAE,MAAM;IAL1B,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC;IACvB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAG9B,MAAM,EAAE,MAAM,EACxB,OAAO,GAAE,qBAAqB,GAAG,SAA2B;IA8B9D,IAAI,MAAM,IAAI,YAAY,CAEzB;IAED,IAAI,MAAM,IAAI,YAAY,CAEzB;IAED,IAAI,MAAM,IAAI,YAAY,CAEzB;CACF"}
1
+ {"version":3,"file":"DeepgramClient.d.ts","sourceRoot":"","sources":["../../src/DeepgramClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAc;IACxD,IAAI,MAAM,IAAI,YAAY,CAEzB;IAED,IAAI,MAAM,IAAI,YAAY,CAEzB;IAED,IAAI,MAAM,IAAI,YAAY,CAEzB;CACF"}
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const helpers_1 = require("./lib/helpers");
4
- const constants_1 = require("./lib/constants");
3
+ const AbstractClient_1 = require("./packages/AbstractClient");
5
4
  const ListenClient_1 = require("./packages/ListenClient");
6
5
  const ManageClient_1 = require("./packages/ManageClient");
7
6
  const OnPremClient_1 = require("./packages/OnPremClient");
@@ -11,37 +10,15 @@ const OnPremClient_1 = require("./packages/OnPremClient");
11
10
  * An isomorphic Javascript client for interacting with the Deepgram API.
12
11
  * @see https://developers.deepgram.com
13
12
  */
14
- class DeepgramClient {
15
- constructor(apiKey, options = constants_1.DEFAULT_OPTIONS) {
16
- var _a, _b;
17
- this.apiKey = apiKey;
18
- this.key = apiKey;
19
- if (!apiKey) {
20
- this.key = process.env.DEEPGRAM_API_KEY;
21
- }
22
- if (!this.key) {
23
- if (!apiKey)
24
- throw new Error("A deepgram API key is required");
25
- }
26
- const settings = (0, helpers_1.applySettingDefaults)(options, constants_1.DEFAULT_OPTIONS);
27
- if (!settings.global.url) {
28
- throw new Error(`An API URL is required. It should be set to ${constants_1.DEFAULT_URL} by default. No idea what happened!`);
29
- }
30
- let url = settings.global.url;
31
- if (!/^https?:\/\//i.test(url)) {
32
- url = "https://" + url;
33
- }
34
- this.baseUrl = new URL((0, helpers_1.stripTrailingSlash)(url));
35
- this.headers = (_b = (_a = settings.global) === null || _a === void 0 ? void 0 : _a.headers) !== null && _b !== void 0 ? _b : {};
36
- }
13
+ class DeepgramClient extends AbstractClient_1.AbstractClient {
37
14
  get listen() {
38
- return new ListenClient_1.ListenClient(this.baseUrl, this.headers, this.key);
15
+ return new ListenClient_1.ListenClient(this.key, this.options);
39
16
  }
40
17
  get manage() {
41
- return new ManageClient_1.ManageClient(this.baseUrl, this.headers, this.key);
18
+ return new ManageClient_1.ManageClient(this.key, this.options);
42
19
  }
43
20
  get onprem() {
44
- return new OnPremClient_1.OnPremClient(this.baseUrl, this.headers, this.key);
21
+ return new OnPremClient_1.OnPremClient(this.key, this.options);
45
22
  }
46
23
  }
47
24
  exports.default = DeepgramClient;
@@ -1 +1 @@
1
- {"version":3,"file":"DeepgramClient.js","sourceRoot":"","sources":["../../src/DeepgramClient.ts"],"names":[],"mappings":";;AAAA,2CAAyE;AACzE,+CAA+D;AAC/D,0DAAuD;AACvD,0DAAuD;AACvD,0DAAuD;AAGvD;;;;;GAKG;AACH,MAAqB,cAAc;IAKjC,YACY,MAAc,EACxB,UAA6C,2BAAe;;QADlD,WAAM,GAAN,MAAM,CAAQ;QAGxB,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;QAElB,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,gBAA0B,CAAC;SACnD;QAED,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,MAAM;gBAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SAChE;QAED,MAAM,QAAQ,GAAG,IAAA,8BAAoB,EAAC,OAAO,EAAE,2BAAe,CAAC,CAAC;QAEhE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE;YACxB,MAAM,IAAI,KAAK,CACb,+CAA+C,uBAAW,qCAAqC,CAChG,CAAC;SACH;QAED,IAAI,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC;QAE9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YAC9B,GAAG,GAAG,UAAU,GAAG,GAAG,CAAC;SACxB;QAED,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,CAAC,IAAA,4BAAkB,EAAC,GAAG,CAAC,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,MAAA,MAAA,QAAQ,CAAC,MAAM,0CAAE,OAAO,mCAAI,EAAE,CAAC;IAChD,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAChE,CAAC;CACF;AAhDD,iCAgDC"}
1
+ {"version":3,"file":"DeepgramClient.js","sourceRoot":"","sources":["../../src/DeepgramClient.ts"],"names":[],"mappings":";;AAAA,8DAA2D;AAC3D,0DAAuD;AACvD,0DAAuD;AACvD,0DAAuD;AAEvD;;;;;GAKG;AACH,MAAqB,cAAe,SAAQ,+BAAc;IACxD,IAAI,MAAM;QACR,OAAO,IAAI,2BAAY,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,2BAAY,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,2BAAY,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;CACF;AAZD,iCAYC"}
@@ -8,8 +8,13 @@ export { createClient, DeepgramClient };
8
8
  /**
9
9
  * Helpful exports.
10
10
  */
11
+ export * from "./packages";
11
12
  export * from "./lib/types";
12
13
  export * from "./lib/enums";
13
14
  export * from "./lib/constants";
14
15
  export * from "./lib/errors";
16
+ /**
17
+ * Captions.
18
+ */
19
+ export { webvtt, srt } from "@deepgram/captions";
15
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,YAAY,WAAY,MAAM,YAAY,qBAAqB,KAAG,cAEvE,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAExC;;GAEG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD;;GAEG;AACH,QAAA,MAAM,YAAY,WAAY,MAAM,YAAW,qBAAqB,KAAQ,cAE3E,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAExC;;GAEG;AACH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAE7B;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC"}