Skip to main content

$dialer.getAsrProvider

This method returns the ASR provider name of the phone channel used for the current call.

Syntax

The method is called without arguments:

$dialer.getAsrProvider();

The method returns a string with the provider name:

ProviderValue
3iTechzitech
ASM Solutionsasm
Azureazure
Googlegoogle
Kaldikaldi
Tinkofftinkoff
Yandexyandex

How to use

Use the $dialer.getAsrProvider method to set up a condition that a particular ASR provider is used in the phone channel. This will allow you to call $dialer.setAsrConfig safely and override only the settings relevant for the provider.

state: SpeakFrench
q!: * speak french *
script:
var provider = $dialer.getAsrProvider();

if (provider === "google") {
$dialer.setAsrConfig({ lang: "fr-FR" });
} else if (provider === "azure") {
$dialer.setAsrConfig({ language: "fr-FR" });
} else {
# For other providers, the properties and values to be overridden may be different
}
a: Comment puis-je vous aider ?