Skip to content

Commit 6156a14

Browse files
committed
Added summarize option
1 parent c58446c commit 6156a14

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/types/alternatives.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ParagraphGroup } from "./paragraphGroup";
22
import { WordBase } from "./wordBase";
3+
import { Summary } from "./summary";
34

45
export type Alternative = {
56
/**
@@ -14,6 +15,10 @@ export type Alternative = {
1415
* Array of words included in the transcript
1516
*/
1617
words: Array<WordBase>;
18+
/**
19+
* Array of summary objects.
20+
*/
21+
summaries?: Array<Summary>;
1722
/**
1823
* Array of paragraph objects.
1924
*/

src/types/prerecordedTranscriptionOptions.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,8 @@ export type PrerecordedTranscriptionOptions = {
167167
* diarize, or multichannel to true.
168168
*/
169169
paragraphs?: boolean;
170+
/**
171+
* Indicates whether Deepgram should provide summarizations of sections of the provided audio.
172+
*/
173+
summarize?: boolean;
170174
};

src/types/summary.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Summary of a section of audio provided.
3+
*/
4+
export type Summary = {
5+
/**
6+
* Summary of a section of the transcript
7+
*/
8+
summary?: string;
9+
/**
10+
* Word position in transcript where the summary begins
11+
*/
12+
start_word?: number;
13+
/**
14+
* Word position in transcript where the summary ends
15+
*/
16+
end_word?: number;
17+
};

0 commit comments

Comments
 (0)