Package ai.picovoice.orca
Class Orca.Builder
- java.lang.Object
-
- ai.picovoice.orca.Orca.Builder
-
- Enclosing class:
- Orca
public static class Orca.Builder extends java.lang.ObjectBuilder for creating instance of Orca.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Orcabuild(android.content.Context context)Validates properties and creates an instance of the Orca Text-to-Speech engine.Orca.BuildersetAccessKey(java.lang.String accessKey)Sets the AccessKey.Orca.BuildersetModelPath(java.lang.String modelPath)Sets the path to the model file (`.pv`).
-
-
-
Method Detail
-
setAccessKey
public Orca.Builder setAccessKey(java.lang.String accessKey)
Sets the AccessKey.- Parameters:
accessKey- AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)- Returns:
- Modified builder object.
-
setModelPath
public Orca.Builder setModelPath(java.lang.String modelPath)
Sets the path to the model file (`.pv`).- Parameters:
modelPath- Absolute path to the file (`.pv`) containing Orca model parameters.- Returns:
- Modified builder object.
-
build
public Orca build(android.content.Context context) throws OrcaException
Validates properties and creates an instance of the Orca Text-to-Speech engine.- Returns:
- An instance Orca Text-to-Speech engine
- Throws:
OrcaException- if there is an error while initializing Orca.
-
-