public class Rhino
extends java.lang.Object
getFrameLength() . The incoming audio needs to have a
sample rate equal to getSampleRate() and be 16-bit linearly-encoded. Rhino operates on
single-channel audio.| Modifier and Type | Class and Description |
|---|---|
static class |
Rhino.Builder
Builder for creating an instance of Rhino with a mixture of default arguments
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Releases resources acquired by Rhino.
|
java.lang.String |
getContextInformation()
Getter for context information.
|
int |
getFrameLength()
Getter for number of audio samples per frame.
|
RhinoInference |
getInference()
Gets inference result from Rhino.
|
int |
getSampleRate()
Getter for audio sample rate accepted by Picovoice.
|
java.lang.String |
getVersion()
Getter for version.
|
boolean |
process(short[] pcm)
Processes a frame of audio and emits a flag indicating if the inference is finalized.
|
public void delete()
public boolean process(short[] pcm)
throws RhinoException
getInference() should be called to retrieve the intent and slots, if the
spoken command is considered valid.pcm - A frame of audio samples. The number of samples per frame can be attained by
calling getFrameLength(). The incoming audio needs to have a sample rate
equal to getSampleRate() and be 16-bit linearly-encoded. Furthermore,
Rhino operates on single channel audio.RhinoException - if there is an error while processing the audio frame.public RhinoInference getInference() throws RhinoException
RhinoInference object.RhinoException - if inference retrieval fails.public java.lang.String getContextInformation()
public int getFrameLength()
public int getSampleRate()
public java.lang.String getVersion()