@deepgram/sdk 1.2.2 → 1.3.1-beta

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 (197) hide show
  1. package/.devcontainer/Dockerfile +16 -0
  2. package/.devcontainer/devcontainer.json +29 -0
  3. package/CHANGELOG.md +196 -163
  4. package/CODE_OF_CONDUCT.md +127 -127
  5. package/CONTRIBUTING.md +50 -50
  6. package/LICENSE +21 -21
  7. package/README.md +151 -151
  8. package/dist/billing.d.ts +18 -0
  9. package/dist/billing.js +73 -0
  10. package/dist/billing.js.map +1 -0
  11. package/dist/constants/defaultOptions.d.ts +6 -6
  12. package/dist/constants/defaultOptions.js +9 -9
  13. package/dist/constants/defaultOptions.js.map +0 -0
  14. package/dist/constants/index.d.ts +1 -1
  15. package/dist/constants/index.js +17 -13
  16. package/dist/constants/index.js.map +1 -1
  17. package/dist/enums/alternatives.d.ts +4 -4
  18. package/dist/enums/alternatives.js +2 -2
  19. package/dist/enums/alternatives.js.map +0 -0
  20. package/dist/enums/connectionState.d.ts +6 -6
  21. package/dist/enums/connectionState.js +10 -10
  22. package/dist/enums/connectionState.js.map +0 -0
  23. package/dist/enums/diarization.d.ts +4 -4
  24. package/dist/enums/diarization.js +2 -2
  25. package/dist/enums/diarization.js.map +0 -0
  26. package/dist/enums/index.d.ts +7 -7
  27. package/dist/enums/index.js +23 -19
  28. package/dist/enums/index.js.map +1 -1
  29. package/dist/enums/liveTranscriptionEvents.d.ts +6 -6
  30. package/dist/enums/liveTranscriptionEvents.js +2 -2
  31. package/dist/enums/liveTranscriptionEvents.js.map +0 -0
  32. package/dist/enums/models.d.ts +5 -5
  33. package/dist/enums/models.js +2 -2
  34. package/dist/enums/models.js.map +0 -0
  35. package/dist/enums/punctuation.d.ts +4 -4
  36. package/dist/enums/punctuation.js +2 -2
  37. package/dist/enums/punctuation.js.map +0 -0
  38. package/dist/enums/searchKind.d.ts +4 -4
  39. package/dist/enums/searchKind.js +2 -2
  40. package/dist/enums/searchKind.js.map +0 -0
  41. package/dist/helpers/index.d.ts +1 -1
  42. package/dist/helpers/index.js +17 -13
  43. package/dist/helpers/index.js.map +1 -1
  44. package/dist/helpers/secondsToTimestamp.d.ts +1 -1
  45. package/dist/helpers/secondsToTimestamp.js +7 -7
  46. package/dist/helpers/secondsToTimestamp.js.map +0 -0
  47. package/dist/httpRequest.d.ts +3 -3
  48. package/dist/httpRequest.js +90 -90
  49. package/dist/httpRequest.js.map +1 -1
  50. package/dist/index.d.ts +25 -17
  51. package/dist/index.js +40 -32
  52. package/dist/index.js.map +1 -1
  53. package/dist/invitation.d.ts +29 -0
  54. package/dist/invitation.js +99 -0
  55. package/dist/invitation.js.map +1 -0
  56. package/dist/keys.d.ts +32 -32
  57. package/dist/keys.js +131 -111
  58. package/dist/keys.js.map +1 -1
  59. package/dist/members.d.ts +18 -0
  60. package/dist/members.js +73 -0
  61. package/dist/members.js.map +1 -0
  62. package/dist/projects.d.ts +21 -21
  63. package/dist/projects.js +81 -81
  64. package/dist/projects.js.map +1 -1
  65. package/dist/scopes.d.ts +20 -0
  66. package/dist/scopes.js +77 -0
  67. package/dist/scopes.js.map +1 -0
  68. package/dist/transcription/index.d.ts +18 -18
  69. package/dist/transcription/index.js +71 -71
  70. package/dist/transcription/index.js.map +0 -0
  71. package/dist/transcription/liveTranscription.d.ts +23 -23
  72. package/dist/transcription/liveTranscription.js +82 -82
  73. package/dist/transcription/liveTranscription.js.map +1 -1
  74. package/dist/transcription/preRecordedTranscription.d.ts +8 -8
  75. package/dist/transcription/preRecordedTranscription.js +113 -113
  76. package/dist/transcription/preRecordedTranscription.js.map +1 -1
  77. package/dist/types/balance.d.ts +6 -0
  78. package/dist/types/balance.js +3 -0
  79. package/dist/types/balance.js.map +1 -0
  80. package/dist/types/balanceList.d.ts +4 -0
  81. package/dist/types/balanceList.js +3 -0
  82. package/dist/types/balanceList.js.map +1 -0
  83. package/dist/types/channel.d.ts +25 -25
  84. package/dist/types/channel.js +2 -2
  85. package/dist/types/channel.js.map +0 -0
  86. package/dist/types/createKeyOptions.d.ts +13 -13
  87. package/dist/types/createKeyOptions.js +2 -2
  88. package/dist/types/createKeyOptions.js.map +0 -0
  89. package/dist/types/hit.d.ts +21 -21
  90. package/dist/types/hit.js +2 -2
  91. package/dist/types/hit.js.map +0 -0
  92. package/dist/types/index.d.ts +35 -28
  93. package/dist/types/index.js +51 -40
  94. package/dist/types/index.js.map +1 -1
  95. package/dist/types/invitationList.d.ts +4 -0
  96. package/dist/types/invitationList.js +3 -0
  97. package/dist/types/invitationList.js.map +1 -0
  98. package/dist/types/invitationOptions.d.ts +4 -0
  99. package/dist/types/invitationOptions.js +3 -0
  100. package/dist/types/invitationOptions.js.map +1 -0
  101. package/dist/types/key.d.ts +25 -25
  102. package/dist/types/key.js +2 -2
  103. package/dist/types/key.js.map +0 -0
  104. package/dist/types/keyResponse.d.ts +50 -10
  105. package/dist/types/keyResponse.js +2 -2
  106. package/dist/types/keyResponse.js.map +0 -0
  107. package/dist/types/keyword.d.ts +4 -4
  108. package/dist/types/keyword.js +2 -2
  109. package/dist/types/keyword.js.map +0 -0
  110. package/dist/types/liveTranscriptionOptions.d.ts +148 -148
  111. package/dist/types/liveTranscriptionOptions.js +2 -2
  112. package/dist/types/liveTranscriptionOptions.js.map +0 -0
  113. package/dist/types/liveTranscriptionResponse.d.ts +9 -9
  114. package/dist/types/liveTranscriptionResponse.js +2 -2
  115. package/dist/types/liveTranscriptionResponse.js.map +0 -0
  116. package/dist/types/member.d.ts +7 -6
  117. package/dist/types/member.js +2 -2
  118. package/dist/types/member.js.map +0 -0
  119. package/dist/types/memberList.d.ts +4 -0
  120. package/dist/types/memberList.js +3 -0
  121. package/dist/types/memberList.js.map +1 -0
  122. package/dist/types/message.d.ts +3 -0
  123. package/dist/types/message.js +3 -0
  124. package/dist/types/message.js.map +1 -0
  125. package/dist/types/metadata.d.ts +8 -8
  126. package/dist/types/metadata.js +2 -2
  127. package/dist/types/metadata.js.map +0 -0
  128. package/dist/types/prerecordedTranscriptionOptions.d.ts +126 -126
  129. package/dist/types/prerecordedTranscriptionOptions.js +2 -2
  130. package/dist/types/prerecordedTranscriptionOptions.js.map +0 -0
  131. package/dist/types/prerecordedTranscriptionResponse.d.ts +25 -25
  132. package/dist/types/prerecordedTranscriptionResponse.js +50 -50
  133. package/dist/types/prerecordedTranscriptionResponse.js.map +1 -1
  134. package/dist/types/project.d.ts +17 -17
  135. package/dist/types/project.js +2 -2
  136. package/dist/types/project.js.map +0 -0
  137. package/dist/types/projectPatchResponse.d.ts +6 -6
  138. package/dist/types/projectPatchResponse.js +2 -2
  139. package/dist/types/projectPatchResponse.js.map +0 -0
  140. package/dist/types/projectResponse.d.ts +4 -4
  141. package/dist/types/projectResponse.js +2 -2
  142. package/dist/types/projectResponse.js.map +0 -0
  143. package/dist/types/scopeList.d.ts +3 -0
  144. package/dist/types/scopeList.js +3 -0
  145. package/dist/types/scopeList.js.map +1 -0
  146. package/dist/types/search.d.ts +14 -14
  147. package/dist/types/search.js +2 -2
  148. package/dist/types/search.js.map +0 -0
  149. package/dist/types/transcriptionSource.d.ts +14 -14
  150. package/dist/types/transcriptionSource.js +2 -2
  151. package/dist/types/transcriptionSource.js.map +0 -0
  152. package/dist/types/usageCallback.d.ts +4 -4
  153. package/dist/types/usageCallback.js +2 -2
  154. package/dist/types/usageCallback.js.map +0 -0
  155. package/dist/types/usageField.d.ts +7 -7
  156. package/dist/types/usageField.js +2 -2
  157. package/dist/types/usageField.js.map +0 -0
  158. package/dist/types/usageFieldOptions.d.ts +4 -4
  159. package/dist/types/usageFieldOptions.js +2 -2
  160. package/dist/types/usageFieldOptions.js.map +0 -0
  161. package/dist/types/usageOptions.d.ts +23 -23
  162. package/dist/types/usageOptions.js +2 -2
  163. package/dist/types/usageOptions.js.map +0 -0
  164. package/dist/types/usageRequest.d.ts +11 -11
  165. package/dist/types/usageRequest.js +2 -2
  166. package/dist/types/usageRequest.js.map +0 -0
  167. package/dist/types/usageRequestDetail.d.ts +30 -30
  168. package/dist/types/usageRequestDetail.js +2 -2
  169. package/dist/types/usageRequestDetail.js.map +0 -0
  170. package/dist/types/usageRequestList.d.ts +6 -6
  171. package/dist/types/usageRequestList.js +2 -2
  172. package/dist/types/usageRequestList.js.map +0 -0
  173. package/dist/types/usageRequestListOptions.d.ts +7 -7
  174. package/dist/types/usageRequestListOptions.js +2 -2
  175. package/dist/types/usageRequestListOptions.js.map +0 -0
  176. package/dist/types/usageRequestMessage.d.ts +3 -3
  177. package/dist/types/usageRequestMessage.js +2 -2
  178. package/dist/types/usageRequestMessage.js.map +0 -0
  179. package/dist/types/usageResponse.d.ts +10 -10
  180. package/dist/types/usageResponse.js +2 -2
  181. package/dist/types/usageResponse.js.map +0 -0
  182. package/dist/types/usageResponseDetail.d.ts +6 -6
  183. package/dist/types/usageResponseDetail.js +2 -2
  184. package/dist/types/usageResponseDetail.js.map +0 -0
  185. package/dist/types/utterance.d.ts +39 -39
  186. package/dist/types/utterance.js +2 -2
  187. package/dist/types/utterance.js.map +0 -0
  188. package/dist/types/wordBase.d.ts +8 -8
  189. package/dist/types/wordBase.js +2 -2
  190. package/dist/types/wordBase.js.map +0 -0
  191. package/dist/usage.d.ts +34 -34
  192. package/dist/usage.js +121 -121
  193. package/dist/usage.js.map +1 -1
  194. package/dist/userAgent.d.ts +1 -1
  195. package/dist/userAgent.js +19 -20
  196. package/dist/userAgent.js.map +1 -1
  197. package/package.json +59 -57
@@ -1,126 +1,126 @@
1
- import { Models } from "../enums";
2
- /**
3
- * Options for transcription
4
- */
5
- export declare type PrerecordedTranscriptionOptions = {
6
- /**
7
- * AI model used to process submitted audio.
8
- * @default general
9
- * @remarks Possible values are general, phonecall, meeting or a custom string
10
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/model
11
- */
12
- model?: Models | string;
13
- /**
14
- * Version of the model to use.
15
- * @default latest
16
- * @remarks latest OR <version_id>
17
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/version
18
- */
19
- version: string;
20
- /**
21
- * BCP-47 language tag that hints at the primary spoken language.
22
- * @default en-US
23
- * @remarks Possible values are en-GB, en-IN, en-NZ, en-US, es, fr, ko, pt,
24
- * pt-BR, ru, tr or null
25
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/language
26
- */
27
- language?: string;
28
- /**
29
- * Indicates whether to add punctuation and capitalization to the transcript.
30
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/punctuate
31
- */
32
- punctuate?: boolean;
33
- /**
34
- * Indicates whether to remove profanity from the transcript.
35
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/profanity_filter
36
- */
37
- profanity_filter?: boolean;
38
- /**
39
- * Indicates whether to redact sensitive information, replacing redacted content with asterisks (*).
40
- * @remarks Options include:
41
- * `pci`: Redacts sensitive credit card information, including credit card number, expiration date, and CVV
42
- * `numbers` (or `true)`: Aggressively redacts strings of numerals
43
- * `ssn` (*beta*): Redacts social security numbers
44
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/redact
45
- */
46
- redact?: Array<string>;
47
- /**
48
- * Indicates whether to recognize speaker changes. When set to true, each word
49
- * in the transcript will be assigned a speaker number starting at 0.
50
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/diarize
51
- */
52
- diarize?: boolean;
53
- /**
54
- * Indicates whether to transcribe each audio channel independently. When set
55
- * to true, you will receive one transcript for each channel, which means you
56
- * can apply a different model to each channel using the model parameter (e.g.,
57
- * set model to general:phonecall, which applies the general model to channel
58
- * 0 and the phonecall model to channel 1).
59
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/multichannel
60
- */
61
- multichannel?: boolean;
62
- /**
63
- * Maximum number of transcript alternatives to return. Just like a human listener,
64
- * Deepgram can provide multiple possible interpretations of what it hears.
65
- * @default 1
66
- */
67
- alternatives?: number;
68
- /**
69
- * Indicates whether to convert numbers from written format (e.g., one) to
70
- * numerical format (e.g., 1). Deepgram can format numbers up to 999,999.
71
- * @remarks Converted numbers do not include punctuation. For example,
72
- * 999,999 would be transcribed as 999999.
73
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/numerals
74
- */
75
- numerals?: boolean;
76
- /**
77
- * Terms or phrases to search for in the submitted audio. Deepgram searches
78
- * for acoustic patterns in audio rather than text patterns in transcripts
79
- * because we have noticed that acoustic pattern matching is more performant.
80
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/search
81
- */
82
- search?: Array<string>;
83
- /**
84
- * Callback URL to provide if you would like your submitted audio to be
85
- * processed asynchronously. When passed, Deepgram will immediately respond
86
- * with a request_id. When it has finished analyzing the audio, it will send
87
- * a POST request to the provided URL with an appropriate HTTP status code.
88
- * @remarks You may embed basic authentication credentials in the callback URL.
89
- * Only ports 80, 443, 8080, and 8443 can be used for callbacks.
90
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/callback
91
- */
92
- callback?: string;
93
- /**
94
- * Keywords to which the model should pay particular attention to boosting
95
- * or suppressing to help it understand context. Just like a human listener,
96
- * Deepgram can better understand mumbled, distorted, or otherwise
97
- * hard-to-decipher speech when it knows the context of the conversation.
98
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/keywords
99
- */
100
- keywords?: Array<string>;
101
- /**
102
- * Indicates whether Deepgram will segment speech into meaningful semantic
103
- * units, which allows the model to interact more naturally and effectively
104
- * with speakers' spontaneous speech patterns. For example, when humans
105
- * speak to each other conversationally, they often pause mid-sentence to
106
- * reformulate their thoughts, or stop and restart a badly-worded sentence.
107
- * When utterances is set to true, these utterances are identified and
108
- * returned in the transcript results.
109
- *
110
- * By default, when utterances is enabled, it starts a new utterance after
111
- * 0.8 s of silence. You can customize the length of time used to determine
112
- * where to split utterances by submitting the utt_split parameter.
113
- * @remarks **BETA FEATURE**
114
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/utterances
115
- */
116
- utterances?: boolean;
117
- /**
118
- * Length of time in seconds of silence between words that Deepgram will
119
- * use when determining where to split utterances. Used when utterances
120
- * is enabled.
121
- * @default 0.8 seconds
122
- * @remarks **BETA FEATURE**
123
- * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/utt_split
124
- */
125
- utt_split?: number;
126
- };
1
+ import { Models } from "../enums";
2
+ /**
3
+ * Options for transcription
4
+ */
5
+ export declare type PrerecordedTranscriptionOptions = {
6
+ /**
7
+ * AI model used to process submitted audio.
8
+ * @default general
9
+ * @remarks Possible values are general, phonecall, meeting or a custom string
10
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/model
11
+ */
12
+ model?: Models | string;
13
+ /**
14
+ * Version of the model to use.
15
+ * @default latest
16
+ * @remarks latest OR <version_id>
17
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/version
18
+ */
19
+ version?: string;
20
+ /**
21
+ * BCP-47 language tag that hints at the primary spoken language.
22
+ * @default en-US
23
+ * @remarks Possible values are en-GB, en-IN, en-NZ, en-US, es, fr, ko, pt,
24
+ * pt-BR, ru, tr or null
25
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/language
26
+ */
27
+ language?: string;
28
+ /**
29
+ * Indicates whether to add punctuation and capitalization to the transcript.
30
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/punctuate
31
+ */
32
+ punctuate?: boolean;
33
+ /**
34
+ * Indicates whether to remove profanity from the transcript.
35
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/profanity_filter
36
+ */
37
+ profanity_filter?: boolean;
38
+ /**
39
+ * Indicates whether to redact sensitive information, replacing redacted content with asterisks (*).
40
+ * @remarks Options include:
41
+ * `pci`: Redacts sensitive credit card information, including credit card number, expiration date, and CVV
42
+ * `numbers` (or `true)`: Aggressively redacts strings of numerals
43
+ * `ssn` (*beta*): Redacts social security numbers
44
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/redact
45
+ */
46
+ redact?: Array<string>;
47
+ /**
48
+ * Indicates whether to recognize speaker changes. When set to true, each word
49
+ * in the transcript will be assigned a speaker number starting at 0.
50
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/diarize
51
+ */
52
+ diarize?: boolean;
53
+ /**
54
+ * Indicates whether to transcribe each audio channel independently. When set
55
+ * to true, you will receive one transcript for each channel, which means you
56
+ * can apply a different model to each channel using the model parameter (e.g.,
57
+ * set model to general:phonecall, which applies the general model to channel
58
+ * 0 and the phonecall model to channel 1).
59
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/multichannel
60
+ */
61
+ multichannel?: boolean;
62
+ /**
63
+ * Maximum number of transcript alternatives to return. Just like a human listener,
64
+ * Deepgram can provide multiple possible interpretations of what it hears.
65
+ * @default 1
66
+ */
67
+ alternatives?: number;
68
+ /**
69
+ * Indicates whether to convert numbers from written format (e.g., one) to
70
+ * numerical format (e.g., 1). Deepgram can format numbers up to 999,999.
71
+ * @remarks Converted numbers do not include punctuation. For example,
72
+ * 999,999 would be transcribed as 999999.
73
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/numerals
74
+ */
75
+ numerals?: boolean;
76
+ /**
77
+ * Terms or phrases to search for in the submitted audio. Deepgram searches
78
+ * for acoustic patterns in audio rather than text patterns in transcripts
79
+ * because we have noticed that acoustic pattern matching is more performant.
80
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/search
81
+ */
82
+ search?: Array<string>;
83
+ /**
84
+ * Callback URL to provide if you would like your submitted audio to be
85
+ * processed asynchronously. When passed, Deepgram will immediately respond
86
+ * with a request_id. When it has finished analyzing the audio, it will send
87
+ * a POST request to the provided URL with an appropriate HTTP status code.
88
+ * @remarks You may embed basic authentication credentials in the callback URL.
89
+ * Only ports 80, 443, 8080, and 8443 can be used for callbacks.
90
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/callback
91
+ */
92
+ callback?: string;
93
+ /**
94
+ * Keywords to which the model should pay particular attention to boosting
95
+ * or suppressing to help it understand context. Just like a human listener,
96
+ * Deepgram can better understand mumbled, distorted, or otherwise
97
+ * hard-to-decipher speech when it knows the context of the conversation.
98
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/keywords
99
+ */
100
+ keywords?: Array<string>;
101
+ /**
102
+ * Indicates whether Deepgram will segment speech into meaningful semantic
103
+ * units, which allows the model to interact more naturally and effectively
104
+ * with speakers' spontaneous speech patterns. For example, when humans
105
+ * speak to each other conversationally, they often pause mid-sentence to
106
+ * reformulate their thoughts, or stop and restart a badly-worded sentence.
107
+ * When utterances is set to true, these utterances are identified and
108
+ * returned in the transcript results.
109
+ *
110
+ * By default, when utterances is enabled, it starts a new utterance after
111
+ * 0.8 s of silence. You can customize the length of time used to determine
112
+ * where to split utterances by submitting the utt_split parameter.
113
+ * @remarks **BETA FEATURE**
114
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/utterances
115
+ */
116
+ utterances?: boolean;
117
+ /**
118
+ * Length of time in seconds of silence between words that Deepgram will
119
+ * use when determining where to split utterances. Used when utterances
120
+ * is enabled.
121
+ * @default 0.8 seconds
122
+ * @remarks **BETA FEATURE**
123
+ * @see https://developers.deepgram.com/api-reference/speech-recognition-api#operation/transcribeAudio/properties/utt_split
124
+ */
125
+ utt_split?: number;
126
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=prerecordedTranscriptionOptions.js.map
File without changes
@@ -1,25 +1,25 @@
1
- import { Metadata } from "./metadata";
2
- import { Channel } from "./channel";
3
- import { Utterance } from "./utterance";
4
- export declare class PrerecordedTranscriptionResponse {
5
- request_id?: string;
6
- metadata?: Metadata;
7
- results?: {
8
- channels: Array<Channel>;
9
- utterances?: Array<Utterance>;
10
- };
11
- /**
12
- * Converts the transcription to the WebVTT format
13
- * @remarks In order to translate the transcription to WebVTT, the utterances
14
- * feature must be used.
15
- * @returns A string with the transcription in the WebVTT format
16
- */
17
- toWebVTT(): string;
18
- /**
19
- * Converts the transcription to the SRT format
20
- * @remarks In order to translate the transcription to SRT, the utterances
21
- * feature must be used.
22
- * @returns A string with the transcription in the SRT format
23
- */
24
- toSRT(): string;
25
- }
1
+ import { Metadata } from "./metadata";
2
+ import { Channel } from "./channel";
3
+ import { Utterance } from "./utterance";
4
+ export declare class PrerecordedTranscriptionResponse {
5
+ request_id?: string;
6
+ metadata?: Metadata;
7
+ results?: {
8
+ channels: Array<Channel>;
9
+ utterances?: Array<Utterance>;
10
+ };
11
+ /**
12
+ * Converts the transcription to the WebVTT format
13
+ * @remarks In order to translate the transcription to WebVTT, the utterances
14
+ * feature must be used.
15
+ * @returns A string with the transcription in the WebVTT format
16
+ */
17
+ toWebVTT(): string;
18
+ /**
19
+ * Converts the transcription to the SRT format
20
+ * @remarks In order to translate the transcription to SRT, the utterances
21
+ * feature must be used.
22
+ * @returns A string with the transcription in the SRT format
23
+ */
24
+ toSRT(): string;
25
+ }
@@ -1,51 +1,51 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PrerecordedTranscriptionResponse = void 0;
4
- var helpers_1 = require("../helpers");
5
- var PrerecordedTranscriptionResponse = /** @class */ (function () {
6
- function PrerecordedTranscriptionResponse() {
7
- }
8
- /**
9
- * Converts the transcription to the WebVTT format
10
- * @remarks In order to translate the transcription to WebVTT, the utterances
11
- * feature must be used.
12
- * @returns A string with the transcription in the WebVTT format
13
- */
14
- PrerecordedTranscriptionResponse.prototype.toWebVTT = function () {
15
- var _a, _b, _c, _d;
16
- if (!this.results || !this.results.utterances) {
17
- throw new Error("This function requires a transcript that was generated with the utterances feature.");
18
- }
19
- var webVTT = "WEBVTT\n\n";
20
- webVTT += "NOTE\nTranscription provided by Deepgram\nRequest Id: " + ((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.request_id) + "\nCreated: " + ((_b = this.metadata) === null || _b === void 0 ? void 0 : _b.created) + "\nDuration: " + ((_c = this.metadata) === null || _c === void 0 ? void 0 : _c.duration) + "\nChannels: " + ((_d = this.metadata) === null || _d === void 0 ? void 0 : _d.channels) + "\n\n";
21
- for (var i = 0; i < this.results.utterances.length; i++) {
22
- var utterance = this.results.utterances[i];
23
- var start = (0, helpers_1.secondsToTimestamp)(utterance.start);
24
- var end = (0, helpers_1.secondsToTimestamp)(utterance.end);
25
- webVTT += i + 1 + "\n" + start + " --> " + end + "\n- " + utterance.transcript + "\n\n";
26
- }
27
- return webVTT;
28
- };
29
- /**
30
- * Converts the transcription to the SRT format
31
- * @remarks In order to translate the transcription to SRT, the utterances
32
- * feature must be used.
33
- * @returns A string with the transcription in the SRT format
34
- */
35
- PrerecordedTranscriptionResponse.prototype.toSRT = function () {
36
- if (!this.results || !this.results.utterances) {
37
- throw new Error("This function requires a transcript that was generated with the utterances feature.");
38
- }
39
- var srt = "";
40
- for (var i = 0; i < this.results.utterances.length; i++) {
41
- var utterance = this.results.utterances[i];
42
- var start = (0, helpers_1.secondsToTimestamp)(utterance.start).replace(".", ",");
43
- var end = (0, helpers_1.secondsToTimestamp)(utterance.end).replace(".", ",");
44
- srt += i + 1 + "\n" + start + " --> " + end + "\n" + utterance.transcript + "\n\n";
45
- }
46
- return srt;
47
- };
48
- return PrerecordedTranscriptionResponse;
49
- }());
50
- exports.PrerecordedTranscriptionResponse = PrerecordedTranscriptionResponse;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrerecordedTranscriptionResponse = void 0;
4
+ var helpers_1 = require("../helpers");
5
+ var PrerecordedTranscriptionResponse = /** @class */ (function () {
6
+ function PrerecordedTranscriptionResponse() {
7
+ }
8
+ /**
9
+ * Converts the transcription to the WebVTT format
10
+ * @remarks In order to translate the transcription to WebVTT, the utterances
11
+ * feature must be used.
12
+ * @returns A string with the transcription in the WebVTT format
13
+ */
14
+ PrerecordedTranscriptionResponse.prototype.toWebVTT = function () {
15
+ var _a, _b, _c, _d;
16
+ if (!this.results || !this.results.utterances) {
17
+ throw new Error("This function requires a transcript that was generated with the utterances feature.");
18
+ }
19
+ var webVTT = "WEBVTT\n\n";
20
+ webVTT += "NOTE\nTranscription provided by Deepgram\nRequest Id: ".concat((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.request_id, "\nCreated: ").concat((_b = this.metadata) === null || _b === void 0 ? void 0 : _b.created, "\nDuration: ").concat((_c = this.metadata) === null || _c === void 0 ? void 0 : _c.duration, "\nChannels: ").concat((_d = this.metadata) === null || _d === void 0 ? void 0 : _d.channels, "\n\n");
21
+ for (var i = 0; i < this.results.utterances.length; i++) {
22
+ var utterance = this.results.utterances[i];
23
+ var start = (0, helpers_1.secondsToTimestamp)(utterance.start);
24
+ var end = (0, helpers_1.secondsToTimestamp)(utterance.end);
25
+ webVTT += "".concat(i + 1, "\n").concat(start, " --> ").concat(end, "\n- ").concat(utterance.transcript, "\n\n");
26
+ }
27
+ return webVTT;
28
+ };
29
+ /**
30
+ * Converts the transcription to the SRT format
31
+ * @remarks In order to translate the transcription to SRT, the utterances
32
+ * feature must be used.
33
+ * @returns A string with the transcription in the SRT format
34
+ */
35
+ PrerecordedTranscriptionResponse.prototype.toSRT = function () {
36
+ if (!this.results || !this.results.utterances) {
37
+ throw new Error("This function requires a transcript that was generated with the utterances feature.");
38
+ }
39
+ var srt = "";
40
+ for (var i = 0; i < this.results.utterances.length; i++) {
41
+ var utterance = this.results.utterances[i];
42
+ var start = (0, helpers_1.secondsToTimestamp)(utterance.start).replace(".", ",");
43
+ var end = (0, helpers_1.secondsToTimestamp)(utterance.end).replace(".", ",");
44
+ srt += "".concat(i + 1, "\n").concat(start, " --> ").concat(end, "\n").concat(utterance.transcript, "\n\n");
45
+ }
46
+ return srt;
47
+ };
48
+ return PrerecordedTranscriptionResponse;
49
+ }());
50
+ exports.PrerecordedTranscriptionResponse = PrerecordedTranscriptionResponse;
51
51
  //# sourceMappingURL=prerecordedTranscriptionResponse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prerecordedTranscriptionResponse.js","sourceRoot":"","sources":["../../src/types/prerecordedTranscriptionResponse.ts"],"names":[],"mappings":";;;AAGA,sCAAgD;AAEhD;IAAA;IA2DA,CAAC;IAnDC;;;;;OAKG;IACI,mDAAQ,GAAf;;QACE,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC7C,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAC;SACH;QAED,IAAI,MAAM,GAAG,YAAY,CAAC;QAE1B,MAAM,IAAI,4DAAyD,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,qBAAc,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,sBAAe,MAAA,IAAI,CAAC,QAAQ,0CAAE,QAAQ,sBAAe,MAAA,IAAI,CAAC,QAAQ,0CAAE,QAAQ,UAAM,CAAC;QAEnN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvD,IAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC7C,IAAM,KAAK,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAClD,IAAM,GAAG,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC;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KAAK,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACpE,IAAM,GAAG,GAAG,IAAA,4BAAkB,EAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAChE,GAAG,IAAI,UAAG,CAAC,GAAG,CAAC,eAAK,KAAK,kBAAQ,GAAG,eAAK,SAAS,CAAC,UAAU,SAAM,CAAC;SACrE;QAED,OAAO,GAAG,CAAC;IACb,CAAC;IACH,uCAAC;AAAD,CAAC,AA3DD,IA2DC;AA3DY,4EAAgC"}
@@ -1,17 +1,17 @@
1
- /**
2
- * Deepgram project
3
- */
4
- export declare type Project = {
5
- /**
6
- * Unique identifier of the project
7
- */
8
- project_id: string;
9
- /**
10
- * User provided name of the project
11
- */
12
- name?: string;
13
- /**
14
- * Name of the company associated with the project. Optional.
15
- */
16
- company?: string;
17
- };
1
+ /**
2
+ * Deepgram project
3
+ */
4
+ export declare type Project = {
5
+ /**
6
+ * Unique identifier of the project
7
+ */
8
+ project_id: string;
9
+ /**
10
+ * User provided name of the project
11
+ */
12
+ name?: string;
13
+ /**
14
+ * Name of the company associated with the project. Optional.
15
+ */
16
+ company?: string;
17
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=project.js.map
File without changes
@@ -1,6 +1,6 @@
1
- export declare type ProjectPatchResponse = {
2
- /**
3
- * Success message.
4
- */
5
- message: string;
6
- };
1
+ export declare type ProjectPatchResponse = {
2
+ /**
3
+ * Success message.
4
+ */
5
+ message: string;
6
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=projectPatchResponse.js.map
File without changes
@@ -1,4 +1,4 @@
1
- import { Project } from "./project";
2
- export declare type ProjectResponse = {
3
- projects: Array<Project>;
4
- };
1
+ import { Project } from "./project";
2
+ export declare type ProjectResponse = {
3
+ projects: Array<Project>;
4
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=projectResponse.js.map
File without changes
@@ -0,0 +1,3 @@
1
+ export declare type ScopeList = {
2
+ scopes: Array<string>;
3
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=scopeList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopeList.js","sourceRoot":"","sources":["../../src/types/scopeList.ts"],"names":[],"mappings":""}
@@ -1,14 +1,14 @@
1
- import { Hit } from "./hit";
2
- /**
3
- * Search result for a transcription
4
- */
5
- export declare type Search = {
6
- /**
7
- * Term for which Deepgram is searching.
8
- */
9
- query: string;
10
- /**
11
- * Instances of query found in transcript
12
- */
13
- hits: Array<Hit>;
14
- };
1
+ import { Hit } from "./hit";
2
+ /**
3
+ * Search result for a transcription
4
+ */
5
+ export declare type Search = {
6
+ /**
7
+ * Term for which Deepgram is searching.
8
+ */
9
+ query: string;
10
+ /**
11
+ * Instances of query found in transcript
12
+ */
13
+ hits: Array<Hit>;
14
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=search.js.map
File without changes
@@ -1,14 +1,14 @@
1
- /// <reference types="node" />
2
- import { ReadStream } from "fs";
3
- export declare type TranscriptionSource = UrlSource | BufferSource | ReadStreamSource;
4
- export declare type ReadStreamSource = {
5
- stream: ReadStream;
6
- mimetype: string;
7
- };
8
- export declare type UrlSource = {
9
- url: string;
10
- };
11
- export declare type BufferSource = {
12
- buffer: Buffer;
13
- mimetype: string;
14
- };
1
+ /// <reference types="node" />
2
+ import { ReadStream } from "fs";
3
+ export declare type TranscriptionSource = UrlSource | BufferSource | ReadStreamSource;
4
+ export declare type ReadStreamSource = {
5
+ stream: ReadStream;
6
+ mimetype: string;
7
+ };
8
+ export declare type UrlSource = {
9
+ url: string;
10
+ };
11
+ export declare type BufferSource = {
12
+ buffer: Buffer;
13
+ mimetype: string;
14
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=transcriptionSource.js.map
File without changes
@@ -1,4 +1,4 @@
1
- export declare type UsageCallback = {
2
- code: number;
3
- completed: string;
4
- };
1
+ export declare type UsageCallback = {
2
+ code: number;
3
+ completed: string;
4
+ };
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=usageCallback.js.map
File without changes