12 from .rhino
import Rhino
13 from .rhino
import RhinoError
14 from .rhino
import RhinoMemoryError
15 from .rhino
import RhinoIOError
16 from .rhino
import RhinoInvalidArgumentError
17 from .rhino
import RhinoStopIterationError
18 from .rhino
import RhinoKeyError
19 from .rhino
import RhinoInvalidStateError
20 from .rhino
import RhinoRuntimeError
21 from .rhino
import RhinoActivationError
22 from .rhino
import RhinoActivationLimitError
23 from .rhino
import RhinoActivationThrottledError
24 from .rhino
import RhinoActivationRefusedError
32 def create(access_key, context_path, library_path=None, model_path=None, sensitivity=0.5, require_endpoint=True):
34 Factory method for Rhino Speech-to-Intent engine.
36 :param access_key: AccessKey obtained from Picovoice Console (https://console.picovoice.ai/).
37 :param context_path: Absolute path to file containing context model (file with `.rhn` extension. A context
38 represents the set of expressions (spoken commands), intents, and intent arguments (slots) within a domain of
40 :param library_path: Absolute path to Rhino's dynamic library. If not set it will be set to the default
42 :param model_path: Absolute path to the file containing model parameters. If not set it will be set to the default
44 :param sensitivity: Inference sensitivity. It should be a number within [0, 1]. A higher sensitivity value
45 results in fewer misses at the cost of (potentially) increasing the erroneous inference rate.
46 :param require_endpoint If set to `False`, Rhino does not require an endpoint (chunk of silence) before
48 :return An instance of Rhino Speech-to-Intent engine.
51 if library_path
is None:
52 library_path = LIBRARY_PATH
54 if model_path
is None:
55 model_path = MODEL_PATH
58 access_key=access_key,
59 library_path=library_path,
60 model_path=model_path,
61 context_path=context_path,
62 sensitivity=sensitivity,
63 require_endpoint=require_endpoint)