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a,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IACxD,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAQtG,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQrD,YAAY,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;IAI9C,kBAAkB,IAAI,IAAI;IAG1B,0BAA0B,IAAI,IAAI;IAIlC,eAAe,IAAI,IAAI;IAIvB,KAAK,IAAI,gBAAgB;IAMhC,IAAW,uBAAuB,IAAI,MAAM,CAE3C;IAED,IAAW,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAElD;IAED,IAAW,wBAAwB,IAAI,MAAM,CAE5C;IAED,IAAW,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAEhD;IAED,IAAW,2BAA2B,IAAI,2BAA2B,CAEpE;IAED,IAAW,2BAA2B,CAAC,MAAM,EAAE,2BAA2B,EAEzE;CACJ","file":"SpeechConfig.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n/* eslint-disable max-classes-per-file */\n\nimport { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport {\n    ForceDictationPropertyName,\n    OutputFormatPropertyName,\n    ServicePropertiesPropertyName\n} from \"../common.speech/Exports.js\";\nimport { IStringDictionary } from \"../common/Exports.js\";\nimport { Contracts } from \"./Contracts.js\";\nimport {\n    OutputFormat,\n    ProfanityOption,\n    PropertyCollection,\n    PropertyId,\n    ServicePropertyChannel,\n    SpeechSynthesisOutputFormat,\n} from \"./Exports.js\";\n\n/**\n * Speech configuration.\n * @class SpeechConfig\n */\nexport abstract class SpeechConfig {\n    /**\n     * Creates and initializes an instance.\n     * @constructor\n     */\n    protected constructor() {\n        return;\n    }\n\n    /**\n     * Gets the TokenCredential instance if configured.\n     * Only available if using AAD-based authentication via TokenCredential.\n     * @returns {TokenCredential | undefined}\n     */\n    public abstract get tokenCredential(): TokenCredential | undefined;\n\n    /**\n     * Static instance of SpeechConfig returned by passing subscriptionKey and service region.\n     * Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer.\n     * @member SpeechConfig.fromSubscription\n     * @function\n     * @public\n     * @param {string} subscriptionKey - The subscription key.\n     * @param {string} region - The region name (see the <a href=\"https://aka.ms/csspeech/region\">region page</a>).\n     * @returns {SpeechConfig} The speech factory\n     */\n    public static fromSubscription(subscriptionKey: string, region: string): SpeechConfig {\n        Contracts.throwIfNullOrWhitespace(subscriptionKey, \"subscriptionKey\");\n        Contracts.throwIfNullOrWhitespace(region, \"region\");\n\n        const speechImpl: SpeechConfigImpl = new SpeechConfigImpl();\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_Region, region);\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_IntentRegion, region);\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n\n        return speechImpl;\n    }\n\n    /**\n     * Creates an instance of the speech config with specified endpoint and subscription key.\n     * This method is intended only for users who use a non-standard service endpoint or parameters.\n     * Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer.\n     * Note: The query parameters specified in the endpoint URL are not changed, even if they are set by any other APIs.\n     * For example, if language is defined in the uri as query parameter \"language=de-DE\", and also set by\n     * SpeechConfig.speechRecognitionLanguage = \"en-US\", the language setting in uri takes precedence,\n     * and the effective language is \"de-DE\". Only the parameters that are not specified in the\n     * endpoint URL can be set by other APIs.\n     * Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the\n     * fromEndpoint method, and then set authorizationToken=\"token\" on the created SpeechConfig instance to\n     * use the authorization token.\n     * @member SpeechConfig.fromEndpoint\n     * @function\n     * @public\n     * @param {URL} endpoint - The service endpoint to connect to.\n     * @param {string} subscriptionKey - The subscription key. If a subscription key is not specified, an authorization token must be set.\n     * @returns {SpeechConfig} A speech factory instance.\n     */\n    public static fromEndpoint(endpoint: URL, subscriptionKey?: string): SpeechConfig;\n\n    /**\n     * Creates an instance of SpeechConfig with a custom endpoint and a credential.\n     * The query parameters specified in the endpoint URI are not changed, even if they are set by any other API call.\n     * For example, if the recognition language is defined in the URI query parameter as \"language=de-DE\", and the property SpeechRecognitionLanguage is set to \"en-US\",\n     * the language set in the URI takes precedence, and \"de-DE\" remains the expected language.\n     * Since parameters included in the endpoint URI take priority, only parameters that are not specified in the endpoint URI can be set by other APIs.\n     * Supported credential types:\n     * - KeyCredential: For API key-based authentication.\n     * - TokenCredential: For Azure AD-based authentication.\n     * Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the\n     * fromEndpoint method, and then set authorizationToken=\"token\" on the created SpeechConfig instance to use the authorization token.\n     * @member SpeechConfig.fromEndpoint\n     * @function\n     * @public\n     * @param {URL} endpoint - The service endpoint to connect to.\n     * @param {KeyCredential | TokenCredential} credential - The credential used for authentication.\n     * @returns {SpeechConfig} A speech factory instance.\n     */\n    public static fromEndpoint(endpoint: URL, credential: KeyCredential | TokenCredential): SpeechConfig;\n\n    /**\n     * Internal implementation of fromEndpoint() overloads. Accepts either a subscription key or a TokenCredential.\n     * @private\n     */\n    public static fromEndpoint(endpoint: URL, auth: string | TokenCredential | KeyCredential): SpeechConfig {\n        Contracts.throwIfNull(endpoint, \"endpoint\");\n        const isValidString = typeof auth === \"string\" && auth.trim().length > 0;\n        const isTokenCredential = typeof auth === \"object\" && auth !== null && typeof (auth as TokenCredential).getToken === \"function\";\n        const isKeyCredential = typeof auth === \"object\" && auth !== null && typeof (auth as KeyCredential).key === \"string\";\n        if (auth !== undefined && !isValidString && !isTokenCredential && !isKeyCredential) {\n            throw new Error(\"Invalid 'auth' parameter: expected a non-empty API key string, a TokenCredential, or a KeyCredential.\");\n        }\n\n        let speechImpl: SpeechConfigImpl;\n        if (typeof auth === \"string\") {\n            speechImpl = new SpeechConfigImpl();\n            speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, auth);\n        } else if (typeof auth === \"object\" && typeof (auth as TokenCredential).getToken === \"function\") {\n            speechImpl = new SpeechConfigImpl(auth as TokenCredential);\n        } else if (typeof auth === \"object\" && typeof (auth as KeyCredential).key === \"string\") {\n            speechImpl = new SpeechConfigImpl();\n            speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, (auth as KeyCredential).key);\n        } else {\n            speechImpl = new SpeechConfigImpl();\n        }\n\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_Endpoint, endpoint.href);\n\n        return speechImpl;\n    }\n\n    /**\n     * Creates an instance of the speech config with specified host and subscription key.\n     * This method is intended only for users who use a non-default service host. Standard resource path will be assumed.\n     * For services with a non-standard resource path or no path at all, use fromEndpoint instead.\n     * Note: Query parameters are not allowed in the host URI and must be set by other APIs.\n     * Note: To use an authorization token with fromHost, use fromHost(URL),\n     * and then set the AuthorizationToken property on the created SpeechConfig instance.\n     * Note: Added in version 1.9.0.\n     * @member SpeechConfig.fromHost\n     * @function\n     * @public\n     * @param {URL} host - The service endpoint to connect to. Format is \"protocol://host:port\" where \":port\" is optional.\n     * @param {string} subscriptionKey - The subscription key. If a subscription key is not specified, an authorization token must be set.\n     * @returns {SpeechConfig} A speech factory instance.\n     */\n    public static fromHost(hostName: URL, subscriptionKey?: string): SpeechConfig {\n        Contracts.throwIfNull(hostName, \"hostName\");\n\n        const speechImpl: SpeechConfigImpl = new SpeechConfigImpl();\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_Host, hostName.protocol + \"//\" + hostName.hostname + (hostName.port === \"\" ? \"\" : \":\" + hostName.port));\n\n        // Containers do not yet have /stt/speech/universal/v2 routes.\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_RecognitionEndpointVersion, \"1\");\n\n        if (undefined !== subscriptionKey) {\n            speechImpl.setProperty(PropertyId.SpeechServiceConnection_Key, subscriptionKey);\n        }\n        return speechImpl;\n    }\n\n    /**\n     * Creates an instance of the speech factory with specified initial authorization token and region.\n     * Note: The caller needs to ensure that the authorization token is valid. Before the authorization token\n     * expires, the caller needs to refresh it by calling this setter with a new valid token.\n     * Note: Please use a token derived from your LanguageUnderstanding subscription key in case you want\n     * to use the Intent recognizer. As configuration values are copied when creating a new recognizer,\n     * the new token value will not apply to recognizers that have already been created. For recognizers\n     * that have been created before, you need to set authorization token of the corresponding recognizer\n     * to refresh the token. Otherwise, the recognizers will encounter errors during recognition.\n     * @member SpeechConfig.fromAuthorizationToken\n     * @function\n     * @public\n     * @param {string} authorizationToken - The initial authorization token.\n     * @param {string} region - The region name (see the <a href=\"https://aka.ms/csspeech/region\">region page</a>).\n     * @returns {SpeechConfig} A speech factory instance.\n     */\n    public static fromAuthorizationToken(authorizationToken: string, region: string): SpeechConfig {\n        Contracts.throwIfNull(authorizationToken, \"authorizationToken\");\n        Contracts.throwIfNullOrWhitespace(region, \"region\");\n\n        const speechImpl: SpeechConfigImpl = new SpeechConfigImpl();\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_Region, region);\n        speechImpl.setProperty(PropertyId.SpeechServiceConnection_IntentRegion, region);\n        speechImpl.authorizationToken = authorizationToken;\n        return speechImpl;\n    }\n\n    /**\n     * Sets the proxy configuration.\n     * Only relevant in Node.js environments.\n     * Added in version 1.4.0.\n     * @param proxyHostName The host name of the proxy server.\n     * @param proxyPort The port number of the proxy server.\n     */\n    public abstract setProxy(proxyHostName: string, proxyPort: number): void;\n\n    /**\n     * Sets the proxy configuration.\n     * Only relevant in Node.js environments.\n     * Added in version 1.4.0.\n     * @param proxyHostName The host name of the proxy server, without the protocol scheme (http://)\n     * @param proxyPort The port number of the proxy server.\n     * @param proxyUserName The username of the proxy server.\n     * @param proxyPassword The password of the proxy server.\n     */\n    public abstract setProxy(proxyHostName: string, proxyPort: number, proxyUserName: string, proxyPassword: string): void;\n\n    /**\n     * Gets the authorization token.\n     * @member SpeechConfig.prototype.authorizationToken\n     * @function\n     * @public\n     */\n    public abstract get authorizationToken(): string;\n\n    /**\n     * Gets/Sets the authorization token.\n     * Note: The caller needs to ensure that the authorization token is valid. Before the authorization token\n     * expires, the caller needs to refresh it by calling this setter with a new valid token.\n     * @member SpeechConfig.prototype.authorizationToken\n     * @function\n     * @public\n     * @param {string} value - The authorization token.\n     */\n    public abstract set authorizationToken(value: string);\n\n    /**\n     * Returns the configured language.\n     * @member SpeechConfig.prototype.speechRecognitionLanguage\n     * @function\n     * @public\n     */\n    public abstract get speechRecognitionLanguage(): string;\n\n    /**\n     * Gets/Sets the input language.\n     * @member SpeechConfig.prototype.speechRecognitionLanguage\n     * @function\n     * @public\n     * @param {string} value - The authorization token.\n     */\n    public abstract set speechRecognitionLanguage(value: string);\n\n    /**\n     * Sets an arbitrary property.\n     * @member SpeechConfig.prototype.setProperty\n     * @function\n     * @public\n     * @param {string | PropertyId} name - The name of the property to set.\n     * @param {string} value - The new value of the property.\n     */\n    public abstract setProperty(name: string | PropertyId, value: string): void;\n\n    /**\n     * Returns the current value of an arbitrary property.\n     * @member SpeechConfig.prototype.getProperty\n     * @function\n     * @public\n     * @param {string} name - The name of the property to query.\n     * @param {string} def - The value to return in case the property is not known.\n     * @returns {string} The current value, or provided default, of the given property.\n     */\n    public abstract getProperty(name: string, def?: string): string;\n\n    /**\n     * Gets speech recognition output format (simple or detailed).\n     * Note: This output format is for speech recognition result, use [SpeechConfig.speechSynthesisOutputFormat] to\n     * get synthesized audio output format.\n     * @member SpeechConfig.prototype.outputFormat\n     * @function\n     * @public\n     * @returns {OutputFormat} Returns the output format.\n     */\n    public abstract get outputFormat(): OutputFormat;\n\n    /**\n     * Gets/Sets speech recognition output format (simple or detailed).\n     * Note: This output format is for speech recognition result, use [SpeechConfig.speechSynthesisOutputFormat] to\n     * set synthesized audio output format.\n     * @member SpeechConfig.prototype.outputFormat\n     * @function\n     * @public\n     */\n    public abstract set outputFormat(format: OutputFormat);\n\n    /**\n     * Gets the endpoint ID of a customized speech model that is used for speech recognition.\n     * @member SpeechConfig.prototype.endpointId\n     * @function\n     * @public\n     * @return {string} The endpoint ID\n     */\n    public abstract get endpointId(): string;\n\n    /**\n     * Gets/Sets the endpoint ID of a customized speech model that is used for speech recognition.\n     * @member SpeechConfig.prototype.endpointId\n     * @function\n     * @public\n     * @param {string} value - The endpoint ID\n     */\n    public abstract set endpointId(value: string);\n\n    /**\n     * Closes the configuration.\n     * @member SpeechConfig.prototype.close\n     * @function\n     * @public\n     */\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    public close(): void { }\n\n    /**\n     * @member SpeechConfig.prototype.subscriptionKey\n     * @function\n     * @public\n     * @return {string} The subscription key set on the config.\n     */\n    public abstract get subscriptionKey(): string;\n\n    /**\n     * @member SpeechConfig.prototype.region\n     * @function\n     * @public\n     * @return {region} The region set on the config.\n     */\n    public abstract get region(): string;\n\n    /**\n     * Sets a property value that will be passed to service using the specified channel.\n     * Added in version 1.7.0.\n     * @member SpeechConfig.prototype.setServiceProperty\n     * @function\n     * @public\n     * @param {name} The name of the property.\n     * @param {value} Value to set.\n     * @param {channel} The channel used to pass the specified property to service.\n     */\n    public abstract setServiceProperty(name: string, value: string, channel: ServicePropertyChannel): void;\n\n    /**\n     * Sets profanity option.\n     * Added in version 1.7.0.\n     * @member SpeechConfig.prototype.setProfanity\n     * @function\n     * @public\n     * @param {profanity} Profanity option to set.\n     */\n    public abstract setProfanity(profanity: ProfanityOption): void;\n\n    /**\n     * Enable audio logging in service.\n     * Audio and content logs are stored either in Microsoft-owned storage, or in your own storage account linked\n     * to your Cognitive Services subscription (Bring Your Own Storage (BYOS) enabled Speech resource).\n     * The logs will be removed after 30 days.\n     * Added in version 1.7.0.\n     * @member SpeechConfig.prototype.enableAudioLogging\n     * @function\n     * @public\n     */\n    public abstract enableAudioLogging(): void;\n\n    /**\n     * Includes word-level timestamps.\n     * Added in version 1.7.0.\n     * @member SpeechConfig.prototype.requestWordLevelTimestamps\n     * @function\n     * @public\n     */\n    public abstract requestWordLevelTimestamps(): void;\n\n    /**\n     * Enable dictation. Only supported in speech continuous recognition.\n     * Added in version 1.7.0.\n     * @member SpeechConfig.prototype.enableDictation\n     * @function\n     * @public\n     */\n    public abstract enableDictation(): void;\n\n    /**\n     * Gets the language of the speech synthesizer.\n     * Added in version 1.11.0.\n     * @member SpeechConfig.prototype.speechSynthesisLanguage\n     * @function\n     * @public\n     * @returns {string} Returns the speech synthesis language.\n     */\n    public abstract get speechSynthesisLanguage(): string;\n\n    /**\n     * Sets the language of the speech synthesizer.\n     * Added in version 1.11.0.\n     * @member SpeechConfig.prototype.speechSynthesisLanguage\n     * @function\n     * @public\n     */\n    public abstract set speechSynthesisLanguage(language: string);\n\n    /**\n     * Gets the voice of the speech synthesizer.\n     * Added in version 1.11.0.\n     * @member SpeechConfig.prototype.speechSynthesisVoiceName\n     * @function\n     * @public\n     * @returns {string} Returns the speech synthesis voice.\n     */\n    public abstract get speechSynthesisVoiceName(): string;\n\n    /**\n     * Sets the voice of the speech synthesizer. (see <a href=\"https://aka.ms/speech/tts-languages\">available voices</a>).\n     * Added in version 1.11.0.\n     * @member SpeechConfig.prototype.speechSynthesisVoiceName\n     * @function\n     * @public\n     */\n    public abstract set speechSynthesisVoiceName(voice: string);\n\n    /**\n     * Gets the speech synthesis output format.\n     * Added in version 1.11.0.\n     * @member SpeechConfig.prototype.speechSynthesisOutputFormat\n     * @function\n     * @public\n     * @returns {SpeechSynthesisOutputFormat} Returns the speech synthesis output format\n     */\n    public abstract get speechSynthesisOutputFormat(): SpeechSynthesisOutputFormat;\n\n    /**\n     * Sets the speech synthesis output format (e.g. Riff16Khz16BitMonoPcm).\n     * The default format is Audio16Khz64KBitRateMonoMp3 for browser and Riff16Khz16BitMonoPcm for Node.JS.\n     * Added in version 1.11.0.\n     * @member SpeechConfig.prototype.speechSynthesisOutputFormat\n     * @function\n     * @public\n     */\n    public abstract set speechSynthesisOutputFormat(format: SpeechSynthesisOutputFormat);\n}\n\n/**\n * @public\n * @class SpeechConfigImpl\n */\nexport class SpeechConfigImpl extends SpeechConfig {\n\n    private privProperties: PropertyCollection;\n    private readonly privTokenCredential?: TokenCredential;\n\n    public constructor(tokenCredential?: TokenCredential) {\n        super();\n        this.privProperties = new PropertyCollection();\n        this.speechRecognitionLanguage = \"en-US\"; // Should we have a default?\n        this.outputFormat = OutputFormat.Simple;\n        this.privTokenCredential = tokenCredential;\n    }\n\n    public get properties(): PropertyCollection {\n        return this.privProperties;\n    }\n\n    public get endPoint(): URL {\n        return new URL(this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Endpoint));\n    }\n\n    public get subscriptionKey(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Key);\n    }\n\n    public get region(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_Region);\n    }\n\n    public get authorizationToken(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceAuthorization_Token);\n    }\n\n    public set authorizationToken(value: string) {\n        this.privProperties.setProperty(PropertyId.SpeechServiceAuthorization_Token, value);\n    }\n\n    public get speechRecognitionLanguage(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_RecoLanguage);\n    }\n\n    public set speechRecognitionLanguage(value: string) {\n        this.privProperties.setProperty(PropertyId.SpeechServiceConnection_RecoLanguage, value);\n    }\n\n    public get autoDetectSourceLanguages(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_AutoDetectSourceLanguages);\n    }\n\n    public set autoDetectSourceLanguages(value: string) {\n        this.privProperties.setProperty(PropertyId.SpeechServiceConnection_AutoDetectSourceLanguages, value);\n    }\n\n    public get outputFormat(): OutputFormat {\n        return OutputFormat[this.privProperties.getProperty(OutputFormatPropertyName, undefined) as keyof typeof OutputFormat];\n    }\n\n    public set outputFormat(value: OutputFormat) {\n        this.privProperties.setProperty(OutputFormatPropertyName, OutputFormat[value]);\n    }\n\n    public get endpointId(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_EndpointId);\n    }\n\n    public set endpointId(value: string) {\n        this.privProperties.setProperty(PropertyId.SpeechServiceConnection_EndpointId, value);\n    }\n\n    public get tokenCredential(): TokenCredential | undefined {\n        return this.privTokenCredential;\n    }\n\n    public setProperty(name: string | PropertyId, value: string): void {\n        Contracts.throwIfNull(value, \"value\");\n\n        this.privProperties.setProperty(name, value);\n    }\n\n    public getProperty(name: string | PropertyId, def?: string): string {\n\n        return this.privProperties.getProperty(name, def);\n    }\n\n    public setProxy(proxyHostName: string, proxyPort: number): void;\n    public setProxy(proxyHostName: string, proxyPort: number, proxyUserName: string, proxyPassword: string): void;\n    public setProxy(proxyHostName: any, proxyPort: any, proxyUserName?: any, proxyPassword?: any): void {\n        this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyHostName], proxyHostName as string);\n        this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyPort], proxyPort as string);\n        this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyUserName], proxyUserName as string);\n        this.setProperty(PropertyId[PropertyId.SpeechServiceConnection_ProxyPassword], proxyPassword as string);\n    }\n\n    public setServiceProperty(name: string, value: string): void {\n        const currentProperties: IStringDictionary<string> = JSON.parse(this.privProperties.getProperty(ServicePropertiesPropertyName, \"{}\")) as IStringDictionary<string>;\n\n        currentProperties[name] = value;\n\n        this.privProperties.setProperty(ServicePropertiesPropertyName, JSON.stringify(currentProperties));\n    }\n\n    public setProfanity(profanity: ProfanityOption): void {\n        this.privProperties.setProperty(PropertyId.SpeechServiceResponse_ProfanityOption, ProfanityOption[profanity]);\n    }\n\n    public enableAudioLogging(): void {\n        this.privProperties.setProperty(PropertyId.SpeechServiceConnection_EnableAudioLogging, \"true\");\n    }\n    public requestWordLevelTimestamps(): void {\n        this.privProperties.setProperty(PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps, \"true\");\n        this.privProperties.setProperty(OutputFormatPropertyName, OutputFormat[OutputFormat.Detailed]);\n    }\n    public enableDictation(): void {\n        this.privProperties.setProperty(ForceDictationPropertyName, \"true\");\n    }\n\n    public clone(): SpeechConfigImpl {\n        const ret: SpeechConfigImpl = new SpeechConfigImpl(this.tokenCredential);\n        ret.privProperties = this.privProperties.clone();\n        return ret;\n    }\n\n    public get speechSynthesisLanguage(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_SynthLanguage);\n    }\n\n    public set speechSynthesisLanguage(language: string) {\n        this.privProperties.setProperty(PropertyId.SpeechServiceConnection_SynthLanguage, language);\n    }\n\n    public get speechSynthesisVoiceName(): string {\n        return this.privProperties.getProperty(PropertyId.SpeechServiceConnection_SynthVoice);\n    }\n\n    public set speechSynthesisVoiceName(voice: string) {\n        this.privProperties.setProperty(PropertyId.SpeechServiceConnection_SynthVoice, voice);\n    }\n\n    public get speechSynthesisOutputFormat(): SpeechSynthesisOutputFormat {\n        return SpeechSynthesisOutputFormat[this.privProperties.getProperty(PropertyId.SpeechServiceConnection_SynthOutputFormat, undefined) as keyof typeof SpeechSynthesisOutputFormat];\n    }\n\n    public set speechSynthesisOutputFormat(format: SpeechSynthesisOutputFormat) {\n        this.privProperties.setProperty(PropertyId.SpeechServiceConnection_SynthOutputFormat, SpeechSynthesisOutputFormat[format]);\n    }\n}\n"]}