UNPKG

@hahnpro/ms-speech-sdk

Version:
1 lines 3.08 kB
{"version":3,"sources":["src/common.speech/ServiceMessages/LanguageId/LanguageIdContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;GAIG;AACH,oBAAY,uBAAuB;IAC/B,kBAAkB,uBAAuB;IACzC,gBAAgB,qBAAqB;IACrC,cAAc,mBAAmB;CACpC;AAED;;;GAGG;AACH,oBAAY,2BAA2B;IACnC;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,kBAAkB,uBAAuB;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;CAC1C","file":"LanguageIdContext.d.ts","sourcesContent":["//\n// Copyright (c) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE.md file in the project root for full license information.\n//\n\nimport { OnSuccess } from \"./OnSuccess\";\nimport { OnUnknown } from \"./OnUnknown\";\nimport { LanguageIdOutput } from \"./LanguageIdOutput\";\n\n/**\n * The enum that represents which mode will language detection take place\n * There is only detectAtAudioStart mode for now as language detection models are not trained for different modes\n * This enum can be extended in future to support different modes\n */\nexport enum LanguageIdDetectionMode {\n DetectAtAudioStart = \"DetectAtAudioStart\",\n DetectContinuous = \"DetectContinuous\",\n DetectSegments = \"DetectSegments\"\n}\n\n/**\n * The language id detection mode, setting this will load the detection setting of MaxAudioDuration and MaxSpeechDuration\n * If the maxAudioDuration and maxSpeechDuration is set in the speech.context, then this detection mode will be ignored\n */\nexport enum LanguageIdDetectionPriority {\n /**\n * default, Service decides the best mode to use.\n */\n Auto = \"Auto\",\n\n /**\n * Offers lower latency via a trade-off of accuracy.\n */\n PrioritizeLatency = \"PrioritizeLatency\",\n\n /**\n * Offers higher accuracy via a trade-off of latency.\n */\n PrioritizeAccuracy = \"PrioritizeAccuracy\"\n}\n\n/**\n * The language id context\n */\nexport interface LanguageIdContext {\n /**\n * The candidate languages for speaker language detection.\n */\n languages: string[];\n\n /**\n * The on success action.\n */\n onSuccess?: OnSuccess;\n\n /**\n * The language detection mode.\n */\n mode?: LanguageIdDetectionMode;\n\n /**\n * The fallback language.\n */\n onUnknown?: OnUnknown;\n\n /**\n * The output\n */\n output?: LanguageIdOutput;\n\n /**\n * The max audio duration\n */\n maxAudioDuration?: number;\n\n /**\n * The max speech duration\n */\n maxSpeechDuration?: number;\n\n /**\n * The priority.\n */\n priority?: LanguageIdDetectionPriority;\n}\n"]}