Package ai.picovoice.orca
Class OrcaSynthesizeParams.Builder
- java.lang.Object
-
- ai.picovoice.orca.OrcaSynthesizeParams.Builder
-
- Enclosing class:
- OrcaSynthesizeParams
public static class OrcaSynthesizeParams.Builder extends java.lang.ObjectBuilder for creating instance of OrcaSynthesizeParams.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OrcaSynthesizeParamsbuild()Validates properties and creates an instance of OrcaSynthesizeParams.OrcaSynthesizeParams.BuildersetRandomState(long randomState)Sets the random state.OrcaSynthesizeParams.BuildersetSpeechRate(float speechRate)Sets the speech rate.
-
-
-
Method Detail
-
setSpeechRate
public OrcaSynthesizeParams.Builder setSpeechRate(float speechRate)
Sets the speech rate.- Parameters:
speechRate- The pace of the synthesized speech. Valid values are within [0.7, 1.3].- Returns:
- Modified builder object.
-
setRandomState
public OrcaSynthesizeParams.Builder setRandomState(long randomState)
Sets the random state.- Parameters:
randomState- The random state for the synthesized speech.- Returns:
- Modified builder object.
-
build
public OrcaSynthesizeParams build() throws OrcaInvalidArgumentException
Validates properties and creates an instance of OrcaSynthesizeParams.- Returns:
- An instance of OrcaSynthesizeParams
- Throws:
OrcaInvalidArgumentException- if there is an invalid parameter.
-
-