1 | import { AtLeastOne } from '../types';
|
2 | interface SpeechGeneratorDefaults {
|
3 | voiceId?: string;
|
4 | }
|
5 | interface TranscriptionDefaults {
|
6 | language?: string;
|
7 | }
|
8 | interface TranslateTextDefaults {
|
9 | sourceLanguage?: string;
|
10 | targetLanguage?: string;
|
11 | }
|
12 | interface IdentifyEntitiesDefaults {
|
13 | collectionId?: string;
|
14 | maxEntities?: number;
|
15 | }
|
16 | interface IdentityLabelsDefaults {
|
17 | type?: string;
|
18 | }
|
19 | interface IdentifyTextDefaults {
|
20 | format?: string;
|
21 | }
|
22 | interface InterpretTextDefaults {
|
23 | type?: string;
|
24 | }
|
25 | interface ConvertConfig {
|
26 | speechGenerator?: PredictionsProviderConfig<SpeechGeneratorDefaults>;
|
27 | transcription?: PredictionsProviderConfig<TranscriptionDefaults>;
|
28 | translateText?: PredictionsProviderConfig<TranslateTextDefaults>;
|
29 | }
|
30 | interface IdentifyConfig {
|
31 | identifyEntities?: PredictionsProviderConfig<IdentifyEntitiesDefaults> & {
|
32 | celebrityDetectionEnabled?: boolean;
|
33 | };
|
34 | identifyLabels?: PredictionsProviderConfig<IdentityLabelsDefaults>;
|
35 | identifyText?: PredictionsProviderConfig<IdentifyTextDefaults>;
|
36 | }
|
37 | interface InterpretConfig {
|
38 | interpretText?: PredictionsProviderConfig<InterpretTextDefaults>;
|
39 | }
|
40 | export interface PredictionsProviderConfig<T> {
|
41 | region?: string;
|
42 | proxy?: boolean;
|
43 | defaults?: T;
|
44 | }
|
45 | export interface PredictionsConvertConfig {
|
46 | convert: ConvertConfig;
|
47 | }
|
48 | export interface PredictionsIdentifyConfig {
|
49 | identify: IdentifyConfig;
|
50 | }
|
51 | export interface PredictionsInterpretConfig {
|
52 | interpret: InterpretConfig;
|
53 | }
|
54 | export type PredictionsConfig = AtLeastOne<PredictionsConvertConfig & PredictionsIdentifyConfig & PredictionsInterpretConfig>;
|
55 | export {};
|