Package ai.picovoice.cheetah
Class Cheetah.Builder
java.lang.Object
ai.picovoice.cheetah.Cheetah.Builder
- Enclosing class:
- Cheetah
Builder for creating an instance of Cheetah with a mixture of default arguments.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Validates properties and creates an instance of the Cheetah speech-to-text engine.setAccessKey(String accessKey) setEnableAutomaticPunctuation(boolean enableAutomaticPunctuation) Setter for enabling automatic punctuation insertion.setEndpointDuration(float endpointDuration) Setter for the duration of endpoint in seconds.setLibraryPath(String libraryPath) setModelPath(String modelPath) Setter for the absolute path to the file containing Cheetah model parameters.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setAccessKey
-
setLibraryPath
-
setModelPath
Setter for the absolute path to the file containing Cheetah model parameters.- Parameters:
modelPath- Absolute path to the file containing Cheetah model parameters.
-
setEndpointDuration
Setter for the duration of endpoint in seconds.- Parameters:
endpointDuration- Duration of endpoint in seconds. A speech endpoint is detected when there is a chunk of audio (with a duration specified herein) after an utterance without any speech in it.
-
setEnableAutomaticPunctuation
Setter for enabling automatic punctuation insertion.- Parameters:
enableAutomaticPunctuation- Set to `true` to enable automatic punctuation insertion.
-
build
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.
-