speech model options
Available in REST API Version 2 and later.Defines the model and optional settings used for speech recognition.
Used by actions get input, play, run speech menu, start transcription
language wrappers and examples
It has the following properties:
Property | Required/Optional | Default | Description |
---|---|---|---|
model | optional | - | The name of the model to use. Use a model that is supported by the language being recognised. When no model is specified, a model suitable for the language will be selected. |
enhanced | optional | false | Whether to use an enhanced variant of the model, if one is available. When true, the speech recognition will be charged at the enhanced rate even if an enhanced variant of the model is not available. |
Note: enhanced models have been optimized to more accurately transcribe audio data from specific sources. They are charged at a higher rate than standard models.
-
Examples:
-
Select the "latest_short" model:
{ "model" : "latest_short" }
-
Select the standard "phone_call" model:
{ "model" : "phone_call", "enhanced" : false }
-
Select the enhanced "phone_call" model:
{ "model" : "phone_call", "enhanced" : true }
-
-
SpeechModelOptions Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dllA class representing the model and optional settings used for speech recognition.
-
public class SpeechModelOptions { // Constructors public SpeechModelOptions(string model = null, bool? enhanced = null); // Members public string Model; public bool? Enhanced; }
Examples:
-
Select the "latest_short" model:
var speechModelOptions = new SpeechModelOptions() { Model = "latest_short" };
-
Select the standard "phone_call" model:
var speechModelOptions = new SpeechModelOptions() { Model = "phone_call", Enhanced = false };
-
Select the enhanced "phone_call" model:
var speechModelOptions = new SpeechModelOptions() { Model = "phone_call", Enhanced = true };
-
-
public class SpeechModelOptions { // Constructors public SpeechModelOptions(string model = null, bool? enhanced = null); // Members public string Model; public bool? Enhanced; }
Examples:
-
Select the "latest_short" model:
var speechModelOptions = new SpeechModelOptions() { Model = "latest_short" };
-
Select the standard "phone_call" model:
var speechModelOptions = new SpeechModelOptions() { Model = "phone_call", Enhanced = false };
-
Select the enhanced "phone_call" model:
var speechModelOptions = new SpeechModelOptions() { Model = "phone_call", Enhanced = true };
-
-
public class SpeechModelOptions { // Constructors public SpeechModelOptions(string model = null, bool? enhanced = null); // Members public string Model; public bool? Enhanced; }
Examples:
-
Select the "latest_short" model:
var speechModelOptions = new SpeechModelOptions() { Model = "latest_short" };
-
Select the standard "phone_call" model:
var speechModelOptions = new SpeechModelOptions() { Model = "phone_call", Enhanced = false };
-
Select the enhanced "phone_call" model:
var speechModelOptions = new SpeechModelOptions() { Model = "phone_call", Enhanced = true };
-
-
-
SpeechModelOptions Class
Namespace: Aculab.Cloud.RestAPIWrapper
Assembly: Aculab.Cloud.RestAPIWrapper.dllA class representing the model and optional settings used for speech recognition.
-
Public Class SpeechModelOptions ' Constructors Public Sub New (Optional model As String = Nothing, Optional enhanced As Bool? = Nothing) ' Members Public Property Model As String Public Property Enhanced As Bool? End Class
Examples:
-
Select the "latest_short" model
Dim speechModelOptions = New SpeechModelOptions(model:="latest_short")
-
Select the standard "phone_call" model
Dim speechModelOptions = New SpeechModelOptions(model:="phone_call", enhanced:=False)
-
Select the enhanced "phone_call" model
Dim speechModelOptions = New SpeechModelOptions(model:="phone_call", enhanced:=True)
-
-
Public Class SpeechModelOptions ' Constructors Public Sub New (Optional model As String = Nothing, Optional enhanced As Bool? = Nothing) ' Members Public Property Model As String Public Property Enhanced As Bool? End Class
Examples:
-
Select the "latest_short" model
Dim speechModelOptions = New SpeechModelOptions(model:="latest_short")
-
Select the standard "phone_call" model
Dim speechModelOptions = New SpeechModelOptions(model:="phone_call", enhanced:=False)
-
Select the enhanced "phone_call" model
Dim speechModelOptions = New SpeechModelOptions(model:="phone_call", enhanced:=True)
-
-
-
class SpeechModelOptions extends JSONElement
Represents the Speech Model Options support class.
Class synopsis:
// Constructors: public SpeechModelOptions() // Members: public void setModel(String model) public void setEnhanced(boolean enhanced)
Examples:
-
Select the "latest_short" model:
SpeechModelOptions speechModelOpts = new SpeechModelOptions(); speechModelOpts.setModel("latest_short");
-
Select the standard "phone_call" model:
SpeechModelOptions speechModelOpts = new SpeechModelOptions(); speechModelOpts.setEnhanced(false); speechModelOpts.setModel("phone_call");
-
Select the enhanced "phone_call" model:
SpeechModelOptions speechModelOpts = new SpeechModelOptions(); speechModelOpts.setEnhanced(true); speechModelOpts.setModel("phone_call");
-
-
class SpeechModelOptions
Represents the Speech Model Options support class.
Class synopsis:
# SpeechModelOptions object: SpeechModelOptions() # Instance methods: SpeechModelOptions.set_model(model) SpeechModelOptions.set_enhanced(enhanced)
Examples:
-
Select the "latest_short" model:
speech_model_opts = SpeechModelOptions() speech_model_opts.set_model("latest_short")
-
Select the standard "phone_call" model:
speech_model_opts = SpeechModelOptions() speech_model_opts.set_enhanced(False) speech_model_opts.set_model("phone_call")
-
Select the enhanced "phone_call" model:
speech_model_opts = SpeechModelOptions() speech_model_opts.set_enhanced(True) speech_model_opts.set_model("phone_call")
-
-
The SpeechModelOptions class
Introduction
Represents the speech model options.
Class synopsis
class SpeechModelOptions { /* methods */ public __construct() public self setModel(string $model) public self setEnhanced(boolean $enhanced) }
Examples:
Select the "latest_short" model:
$speech_model_options = new \Aculab\TelephonyRestAPI\SpeechModelOptions(); $speech_model_options->setModel("latest_short");
Select the standard "phone_call" model:
$speech_model_options = new \Aculab\TelephonyRestAPI\SpeechModelOptions(); $speech_model_options->setModel("phone_call") ->setEnhanced(false);
Select the enhanced "phone_call" model:
$speech_model_options = new \Aculab\TelephonyRestAPI\SpeechModelOptions(); $speech_model_options->setModel("phone_call") ->setEnhanced(true);