Package ai.picovoice.leopard
Class Leopard.Builder
- java.lang.Object
-
- ai.picovoice.leopard.Leopard.Builder
-
- Enclosing class:
- Leopard
public static class Leopard.Builder extends java.lang.ObjectBuilder for creating an instance of Leopard 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 Leopardbuild()Creates an instance of Leopard Speech-to-Text engine.Leopard.BuildersetAccessKey(java.lang.String accessKey)Setter the AccessKey.Leopard.BuildersetEnableAutomaticPunctuation(boolean enableAutomaticPunctuation)Setter for enabling automatic punctuation insertion.Leopard.BuildersetEnableDiarization(boolean enableDiarization)Setter for enabling speaker diarization.Leopard.BuildersetLibraryPath(java.lang.String libraryPath)Setter for the absolute path to the file containing Leopard library.Leopard.BuildersetModelPath(java.lang.String modelPath)Setter for the absolute path to the file containing Leopard model parameters.
-
-
-
Method Detail
-
setAccessKey
public Leopard.Builder setAccessKey(java.lang.String accessKey)
Setter the AccessKey.- Parameters:
accessKey- AccessKey obtained from Picovoice Console
-
setLibraryPath
public Leopard.Builder setLibraryPath(java.lang.String libraryPath)
Setter for the absolute path to the file containing Leopard library.- Parameters:
libraryPath- Absolute path to the Leopard library.
-
setModelPath
public Leopard.Builder setModelPath(java.lang.String modelPath)
Setter for the absolute path to the file containing Leopard model parameters.- Parameters:
modelPath- Absolute path to the file containing Leopard model parameters.
-
setEnableAutomaticPunctuation
public Leopard.Builder setEnableAutomaticPunctuation(boolean enableAutomaticPunctuation)
Setter for enabling automatic punctuation insertion.- Parameters:
enableAutomaticPunctuation- Set to `true` to enable automatic punctuation insertion.
-
setEnableDiarization
public Leopard.Builder setEnableDiarization(boolean enableDiarization)
Setter for enabling speaker diarization.- Parameters:
enableDiarization- Set to `true` to enable speaker diarization, which allows Leopard to differentiate speakers as part of the transcription process. Word metadata will include a `speakerTag` to identify unique speakers.
-
build
public Leopard build() throws LeopardException
Creates an instance of Leopard Speech-to-Text engine.- Throws:
LeopardException
-
-