Class Orca.Builder

  • Enclosing class:
    Orca

    public static class Orca.Builder
    extends java.lang.Object
    Builder for creating instance of Orca.
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Orca build​(android.content.Context context)
      Validates properties and creates an instance of the Orca Text-to-Speech engine.
      Orca.Builder setAccessKey​(java.lang.String accessKey)
      Sets the AccessKey.
      Orca.Builder setModelPath​(java.lang.String modelPath)
      Sets the path to the model file (`.pv`).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Builder

        public Builder()
    • 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.