File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,5 +22,12 @@ public class Alternative
2222 /// </summary>
2323 [ JsonProperty ( "words" ) ]
2424 public Words [ ] Words { get ; set ; }
25+
26+ /// <summary>
27+ /// Array of Paragraph objects.
28+ /// </summary>
29+ /// <remark>Only used when the paragraph feature is enabled on the request</remark>
30+ [ JsonProperty ( "paragraphs" ) ]
31+ public ParagraphGroup [ ] Paragraphs { get ; set ; }
2532 }
2633}
Original file line number Diff line number Diff line change 1+ using System ;
2+ using Newtonsoft . Json ;
3+
4+ namespace Deepgram . Transcription
5+ {
6+ public class Paragraph
7+ {
8+ /// <summary>
9+ /// Array of Sentence objects.
10+ /// </summary>
11+ [ JsonProperty ( "sentences" ) ]
12+ public Sentence [ ] Sentences { get ; set ; }
13+
14+ /// <summary>
15+ /// Offset in seconds from the start of the audio to where the paragraph starts.
16+ /// </summary>
17+ [ JsonProperty ( "start" ) ]
18+ public decimal Start { get ; set ; }
19+
20+ /// <summary>
21+ /// Offset in seconds from the start of the audio to where the paragraph ends.
22+ /// </summary>
23+ [ JsonProperty ( "end" ) ]
24+ public decimal End { get ; set ; }
25+
26+ /// <summary>
27+ /// Number of words in the paragraph
28+ /// </summary>
29+ [ JsonProperty ( "num_words" ) ]
30+ public int NumberOfWords { get ; set ; }
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ using System ;
2+ using Newtonsoft . Json ;
3+
4+ namespace Deepgram . Transcription
5+ {
6+ public class ParagraphGroup
7+ {
8+ /// <summary>
9+ /// Full transcript
10+ /// </summary>
11+ [ JsonProperty ( "transcript" ) ]
12+ public string Transcript { get ; set ; } = string . Empty ;
13+
14+ /// <summary>
15+ /// Array of Paragraph objects.
16+ /// </summary>
17+ [ JsonProperty ( "paragraphs" ) ]
18+ public Paragraph [ ] Paragraphs { get ; set ; }
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ using System ;
2+ using Newtonsoft . Json ;
3+
4+ namespace Deepgram . Transcription
5+ {
6+ public class Sentence
7+ {
8+ /// <summary>
9+ /// Text transcript of the sentence.
10+ /// </summary>
11+ [ JsonProperty ( "text" ) ]
12+ public string Text { get ; set ; } = string . Empty ;
13+
14+ /// <summary>
15+ /// Offset in seconds from the start of the audio to where the sentence starts.
16+ /// </summary>
17+ [ JsonProperty ( "start" ) ]
18+ public decimal Start { get ; set ; }
19+
20+ /// <summary>
21+ /// Offset in seconds from the start of the audio to where the sentence ends.
22+ /// </summary>
23+ [ JsonProperty ( "end" ) ]
24+ public decimal End { get ; set ; }
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments