UNPKG

microsoft-cognitiveservices-speech-sdk

Version:
1 lines 4.97 kB
{"version":3,"sources":["src/sdk/AvatarConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD;;;;;;GAMG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,mBAAmB,CAAkB;IAC7C,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,mBAAmB,CAAM;IACjC,OAAO,CAAC,oBAAoB,CAAiB;IAE7C;;OAEG;IACI,SAAS,EAAE,MAAM,CAAC;IACzB;;OAEG;IACI,KAAK,EAAE,MAAM,CAAC;IACrB;;OAEG;IACI,WAAW,EAAE,iBAAiB,CAAC;IAEtC;;OAEG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;;OAEG;IACH,IAAW,UAAU,CAAC,KAAK,EAAE,OAAO,EAEnC;IAED;;OAEG;IACH,IAAW,eAAe,IAAI,OAAO,CAEpC;IAED;;OAEG;IACH,IAAW,eAAe,CAAC,KAAK,EAAE,OAAO,EAExC;IAED;;OAEG;IACH,IAAW,eAAe,IAAI,MAAM,CAEnC;IAED;;OAEG;IACH,IAAW,eAAe,CAAC,KAAK,EAAE,MAAM,EAEvC;IAED;;OAEG;IACH,IAAW,eAAe,IAAI,GAAG,CAEhC;IAED;;;OAGG;IACH,IAAW,eAAe,CAAC,KAAK,EAAE,GAAG,EAEpC;IAED;;;;OAIG;IACH,IAAW,gBAAgB,IAAI,YAAY,EAAE,CAE5C;IAED;;;;;;OAMG;IACH,IAAW,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,EAEhD;IAED;;;;;;OAMG;gBACgB,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB;CAStF","file":"AvatarConfig.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport { Contracts } from \"./Contracts.js\";\r\nimport { AvatarVideoFormat } from \"./Exports.js\";\r\n\r\n/**\r\n * Defines the talking avatar configuration.\r\n * @class AvatarConfig\r\n * Added in version 1.33.0\r\n *\r\n * @experimental This feature is experimental and might change or have limited support.\r\n */\r\nexport class AvatarConfig {\r\n private privCustomized: boolean = false;\r\n private privUseBuiltInVoice: boolean = false;\r\n private privBackgroundColor: string;\r\n private privBackgroundImage: URL;\r\n private privRemoteIceServers: RTCIceServer[];\r\n\r\n /**\r\n * Defines the avatar character.\r\n */\r\n public character: string;\r\n /**\r\n * Defines the avatar style.\r\n */\r\n public style: string;\r\n /**\r\n * Defines the talking avatar output video format.\r\n */\r\n public videoFormat: AvatarVideoFormat;\r\n\r\n /**\r\n * Indicates if the talking avatar is customized.\r\n */\r\n public get customized(): boolean {\r\n return this.privCustomized;\r\n }\r\n\r\n /**\r\n * Sets if the talking avatar is customized.\r\n */\r\n public set customized(value: boolean) {\r\n this.privCustomized = value;\r\n }\r\n\r\n /**\r\n * Indicates whether to use built-in voice for custom avatar.\r\n */\r\n public get useBuiltInVoice(): boolean {\r\n return this.privUseBuiltInVoice;\r\n }\r\n\r\n /**\r\n * Sets whether to use built-in voice for custom avatar.\r\n */\r\n public set useBuiltInVoice(value: boolean) {\r\n this.privUseBuiltInVoice = value;\r\n }\r\n\r\n /**\r\n * Gets the background color.\r\n */\r\n public get backgroundColor(): string {\r\n return this.privBackgroundColor;\r\n }\r\n\r\n /**\r\n * Sets the background color.\r\n */\r\n public set backgroundColor(value: string) {\r\n this.privBackgroundColor = value;\r\n }\r\n\r\n /**\r\n * Gets the background image.\r\n */\r\n public get backgroundImage(): URL {\r\n return this.privBackgroundImage;\r\n }\r\n\r\n /**\r\n * Sets the background image.\r\n * @param {URL} value - The background image.\r\n */\r\n public set backgroundImage(value: URL) {\r\n this.privBackgroundImage = value;\r\n }\r\n\r\n /**\r\n * Gets the remote ICE servers.\r\n * @remarks This method is designed to be used internally in the SDK.\r\n * @returns {RTCIceServer[]} The remote ICE servers.\r\n */\r\n public get remoteIceServers(): RTCIceServer[] {\r\n return this.privRemoteIceServers;\r\n }\r\n\r\n /**\r\n * Sets the remote ICE servers.\r\n * @remarks Normally, the ICE servers are gathered from the PeerConnection,\r\n * set this property to override the ICE servers. E.g., the ICE servers are\r\n * different in client and server side.\r\n * @param {RTCIceServer[]} value - The remote ICE servers.\r\n */\r\n public set remoteIceServers(value: RTCIceServer[]) {\r\n this.privRemoteIceServers = value;\r\n }\r\n\r\n /**\r\n * Creates and initializes an instance of this class.\r\n * @constructor\r\n * @param {string} character - The avatar character.\r\n * @param {string} style - The avatar style.\r\n * @param {AvatarVideoFormat} videoFormat - The talking avatar output video format.\r\n */\r\n public constructor(character: string, style: string, videoFormat: AvatarVideoFormat) {\r\n Contracts.throwIfNullOrWhitespace(character, \"character\");\r\n this.character = character;\r\n this.style = style;\r\n if (videoFormat === undefined) {\r\n videoFormat = new AvatarVideoFormat();\r\n }\r\n this.videoFormat = videoFormat;\r\n }\r\n}\r\n"]}