microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
1 lines • 1.85 kB
Source Map (JSON)
{"version":3,"sources":["src/common.speech/ServiceMessages/SpeechKeyword.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,qBAAa,aAAc,YAAW,cAAc;IAChD,OAAO,CAAC,iBAAiB,CAAiB;IAE1C,OAAO;WAKO,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,aAAa;IAIvE,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,IAAI,IAAI,MAAM,CAExB;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAEM,MAAM,IAAI,MAAM;CAG1B","file":"SpeechKeyword.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\n// speech.keyword\r\nexport interface ISpeechKeyword {\r\n Status: string;\r\n Text: string;\r\n Offset: number;\r\n Duration: number;\r\n [key: string]: any;\r\n}\r\n\r\nexport class SpeechKeyword implements ISpeechKeyword {\r\n private privSpeechKeyword: ISpeechKeyword;\r\n\r\n private constructor(json: string, baseOffset: number) {\r\n this.privSpeechKeyword = JSON.parse(json) as ISpeechKeyword;\r\n this.privSpeechKeyword.Offset += baseOffset;\r\n }\r\n\r\n public static fromJSON(json: string, baseOffset: number): SpeechKeyword {\r\n return new SpeechKeyword(json, baseOffset);\r\n }\r\n\r\n public get Status(): string {\r\n return this.privSpeechKeyword.Status;\r\n }\r\n\r\n public get Text(): string {\r\n return this.privSpeechKeyword.Text;\r\n }\r\n\r\n public get Offset(): number {\r\n return this.privSpeechKeyword.Offset;\r\n }\r\n\r\n public get Duration(): number {\r\n return this.privSpeechKeyword.Duration;\r\n }\r\n\r\n public asJson(): string {\r\n return JSON.stringify(this.privSpeechKeyword);\r\n }\r\n}\r\n"]}