Package ai.picovoice.cheetah
Class Cheetah.Builder
- java.lang.Object
-
- ai.picovoice.cheetah.Cheetah.Builder
-
- Enclosing class:
- Cheetah
public static class Cheetah.Builder extends java.lang.ObjectBuilder for creating an instance of Cheetah with a mixture of default arguments.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cheetahbuild(android.content.Context context)Validates properties and creates an instance of the Cheetah speech-to-text engine.Cheetah.BuildersetAccessKey(java.lang.String accessKey)Setter the AccessKey.Cheetah.BuildersetEnableAutomaticPunctuation(boolean enableAutomaticPunctuation)Setter for enabling automatic punctuation insertion.Cheetah.BuildersetEndpointDuration(float endpointDuration)Setter for the duration of endpoint in seconds.Cheetah.BuildersetModelPath(java.lang.String modelPath)Setter for the absolute path to the file containing Cheetah model parameters.
-
-
-
Method Detail
-
setAccessKey
public Cheetah.Builder setAccessKey(java.lang.String accessKey)
Setter the AccessKey.- Parameters:
accessKey- AccessKey obtained from Picovoice Console
-
setModelPath
public Cheetah.Builder setModelPath(java.lang.String modelPath)
Setter for the absolute path to the file containing Cheetah model parameters.- Parameters:
modelPath- Absolute path to the file containing Cheetah model parameters.
-
setEndpointDuration
public Cheetah.Builder setEndpointDuration(float endpointDuration)
Setter for the duration of endpoint in seconds.- Parameters:
endpointDuration- Duration of endpoint in seconds.
-
setEnableAutomaticPunctuation
public Cheetah.Builder setEnableAutomaticPunctuation(boolean enableAutomaticPunctuation)
Setter for enabling automatic punctuation insertion.- Parameters:
enableAutomaticPunctuation- Set to `true` to enable automatic punctuation insertion.
-
build
public Cheetah build(android.content.Context context) throws CheetahException
Validates properties and creates an instance of the Cheetah speech-to-text engine.- Returns:
- An instance of Cheetah Engine
- Throws:
CheetahException- if there is an error while initializing Cheetah.
-
-