Skip to content

Commit

Permalink
Merge pull request #40 from SearchCast/main
Browse files Browse the repository at this point in the history
Add Entity and Topic Detection Types
  • Loading branch information
briancbarrow authored Jun 5, 2023
2 parents 8ad711d + 7dcbe0a commit 4e1d84d
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions deepgram/prerecorded.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,31 @@ type WordBase struct {
}

type Alternative struct {
Transcript string `json:"transcript"`
Confidence float64 `json:"confidence"`
Words []WordBase `json:"words"`
Transcript string `json:"transcript"`
Confidence float64 `json:"confidence"`
Words []WordBase `json:"words"`
Topics []TopicBase `json:"topics"`
Entities []EntityBase `json:"entities"`
}

type EntityBase struct {
Label string `json:"label"`
Value string `json:"value"`
Confidence float64 `json:"confidence"`
StartWord int `json:"start_word"`
EndWord int `json:"end_word"`
}

type TopicBase struct {
Text string `json:"text"`
StartWord int `json:"start_word"`
EndWord int `json:"end_word"`
Topics []Topic `json:"topics"`
}

type Topic struct {
Topic string `json:"topic"`
Confidence float64 `json:"confidence"`
}

type Channel struct {
Expand Down

0 comments on commit 4e1d84d

Please sign in to comment.