generated from deepgram/oss-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add audio sits features to JS sdk * fix: fix typos in sync+callback error * feat: sits analyze types and schema
- Loading branch information
1 parent
1ec3603
commit d8de666
Showing
10 changed files
with
422 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Options for read analysis | ||
*/ | ||
interface AnalyzeSchema extends Record<string, unknown> { | ||
callback?: string; | ||
|
||
callback_method?: string; | ||
|
||
custom_intent?: string | string[]; | ||
|
||
custom_intent_mode?: "strict" | "extended"; | ||
|
||
custom_topic?: string | string[]; | ||
|
||
custom_topic_mode?: "strict" | "extended"; | ||
|
||
intents?: boolean; | ||
|
||
language?: string; | ||
|
||
summarize?: boolean; | ||
|
||
sentiment?: boolean; | ||
|
||
topics?: boolean; | ||
} | ||
|
||
export type { AnalyzeSchema }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface AsyncAnalyzeResponse { | ||
request_id: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
export interface SyncAnalyzeResponse { | ||
model_uuid: string; | ||
metadata: Metadata; | ||
results: Results; | ||
} | ||
|
||
interface IntentsInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface SentimentInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface SummaryInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface TopicsInfo { | ||
model_uuid: string; | ||
input_tokens: number; | ||
output_tokens: number; | ||
} | ||
|
||
interface Metadata { | ||
request_id: string; | ||
created: string; | ||
language: string; | ||
intents_info: IntentsInfo; | ||
sentiment_info: SentimentInfo; | ||
summary_info: SummaryInfo; | ||
topics_info: TopicsInfo; | ||
} | ||
|
||
interface Average { | ||
sentiment: string; | ||
sentiment_score: number; | ||
} | ||
|
||
interface Summary { | ||
text: string; | ||
} | ||
|
||
interface Topic { | ||
topic: string; | ||
confidence_score: number; | ||
} | ||
|
||
interface Intent { | ||
intent: string; | ||
confidence_score: number; | ||
} | ||
|
||
interface Segment { | ||
text: string; | ||
start_word: number; | ||
end_word: number; | ||
sentiment: "positive" | "neutral" | "negative"; | ||
sentiment_score?: number; | ||
topics?: Topic[]; | ||
intents?: Intent[]; | ||
} | ||
|
||
interface Sentiments { | ||
segments: Segment[]; | ||
average: Average; | ||
} | ||
|
||
interface Topics { | ||
segments: Segment[]; | ||
} | ||
|
||
interface Intents { | ||
segments: Segment[]; | ||
} | ||
|
||
interface Results { | ||
sentiments?: Sentiments; | ||
summary?: Summary; | ||
topics?: Topics; | ||
intents?: Intents; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.