SpeechConfigImpl class

Extends

Constructors

SpeechConfigImpl()

Properties

authorizationToken
endPoint
endpointId
outputFormat
properties
region
speechRecognitionLanguage
subscriptionKey

Methods

clone()
close()

Closes the configuration.

enableAudioLogging()
enableDictation()
fromAuthorizationToken(string, string)

Creates an instance of the speech factory with specified initial authorization token and region. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. Note: Please use a token derived from your LanguageUnderstanding subscription key in case you want to use the Intent recognizer. As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created. For recognizers that have been created before, you need to set authorization token of the corresponding recognizer to refresh the token. Otherwise, the recognizers will encounter errors during recognition.

fromEndpoint(URL, string)

Creates an instance of the speech config with specified endpoint and subscription key. This method is intended only for users who use a non-standard service endpoint or parameters. Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer. Note: The query parameters specified in the endpoint URL are not changed, even if they are set by any other APIs. For example, if language is defined in the uri as query parameter "language=de-DE", and also set by SpeechConfig.speechRecognitionLanguage = "en-US", the language setting in uri takes precedence, and the effective language is "de-DE". Only the parameters that are not specified in the endpoint URL can be set by other APIs. Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the fromEndpoint method, and then set authorizationToken="token" on the created SpeechConfig instance to use the authorization token.

fromSubscription(string, string)

Static instance of SpeechConfig returned by passing subscriptionKey and service region. Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer.

getProperty(string | PropertyId, string)
requestWordLevelTimestamps()
setProfanity(ProfanityOption)
setProperty(string | PropertyId, string)
setProxy(string, number)
setProxy(string, number, string, string)
setServiceProperty(string, string, ServicePropertyChannel)

Constructor Details

SpeechConfigImpl()

new SpeechConfigImpl()

Property Details

authorizationToken

authorizationToken: string

Property Value

string

endPoint

endPoint: URL

Property Value

URL

endpointId

endpointId: string

Property Value

string

outputFormat

outputFormat: OutputFormat

Property Value

properties

properties: PropertyCollection

Property Value

region

region: string

Property Value

string

speechRecognitionLanguage

speechRecognitionLanguage: string

Property Value

string

subscriptionKey

subscriptionKey: string

Property Value

string

Method Details

clone()

function clone()

Returns

close()

Closes the configuration.

function close()

enableAudioLogging()

function enableAudioLogging()

enableDictation()

function enableDictation()

fromAuthorizationToken(string, string)

Creates an instance of the speech factory with specified initial authorization token and region. Note: The caller needs to ensure that the authorization token is valid. Before the authorization token expires, the caller needs to refresh it by calling this setter with a new valid token. Note: Please use a token derived from your LanguageUnderstanding subscription key in case you want to use the Intent recognizer. As configuration values are copied when creating a new recognizer, the new token value will not apply to recognizers that have already been created. For recognizers that have been created before, you need to set authorization token of the corresponding recognizer to refresh the token. Otherwise, the recognizers will encounter errors during recognition.

static function fromAuthorizationToken(authorizationToken: string, region: string)

Parameters

authorizationToken
string

The initial authorization token.

region
string

The region name (see the region page).

Returns

fromEndpoint(URL, string)

Creates an instance of the speech config with specified endpoint and subscription key. This method is intended only for users who use a non-standard service endpoint or parameters. Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer. Note: The query parameters specified in the endpoint URL are not changed, even if they are set by any other APIs. For example, if language is defined in the uri as query parameter "language=de-DE", and also set by SpeechConfig.speechRecognitionLanguage = "en-US", the language setting in uri takes precedence, and the effective language is "de-DE". Only the parameters that are not specified in the endpoint URL can be set by other APIs. Note: To use authorization token with fromEndpoint, pass an empty string to the subscriptionKey in the fromEndpoint method, and then set authorizationToken="token" on the created SpeechConfig instance to use the authorization token.

static function fromEndpoint(endpoint: URL, subscriptionKey?: string)

Parameters

endpoint
URL

The service endpoint to connect to.

subscriptionKey
string

The subscription key. If a subscription key is not specified, an authorization token must be set.

Returns

fromSubscription(string, string)

Static instance of SpeechConfig returned by passing subscriptionKey and service region. Note: Please use your LanguageUnderstanding subscription key in case you want to use the Intent recognizer.

static function fromSubscription(subscriptionKey: string, region: string)

Parameters

subscriptionKey
string

The subscription key.

region
string

The region name (see the region page).

Returns

getProperty(string | PropertyId, string)

function getProperty(name: string | PropertyId, def?: string)

Parameters

name
string | PropertyId
def
string

Returns

string

requestWordLevelTimestamps()

function requestWordLevelTimestamps()

setProfanity(ProfanityOption)

function setProfanity(profanity: ProfanityOption)

Parameters

profanity
ProfanityOption

setProperty(string | PropertyId, string)

function setProperty(name: string | PropertyId, value: string)

Parameters

name
string | PropertyId
value
string

setProxy(string, number)

function setProxy(proxyHostName: string, proxyPort: number)

Parameters

proxyHostName
string
proxyPort
number

setProxy(string, number, string, string)

function setProxy(proxyHostName: string, proxyPort: number, proxyUserName: string, proxyPassword: string)

Parameters

proxyHostName
string
proxyPort
number
proxyUserName
string
proxyPassword
string

setServiceProperty(string, string, ServicePropertyChannel)

function setServiceProperty(name: string, value: string, channel: ServicePropertyChannel)

Parameters

name
string
value
string