Package ai.picovoice.eagle
Class Eagle
- java.lang.Object
-
- ai.picovoice.eagle.Eagle
-
public class Eagle extends java.lang.ObjectAndroid binding for Eagle speaker recognition engine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEagle.BuilderBuilder for creating instance of Eagle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()Releases resources acquired by Eagle.intgetFrameLength()Getter for number of audio samples per frame.intgetSampleRate()Getter for audio sample rate accepted by Picovoice.java.lang.StringgetVersion()Getter for version.float[]process(short[] pcm)Processes a frame of audio and returns a list of similarity scores for each speaker profile.voidreset()Resets the internal state of Eagle Profiler.static voidsetSdk(java.lang.String sdk)
-
-
-
Method Detail
-
setSdk
public static void setSdk(java.lang.String sdk)
-
delete
public void delete()
Releases resources acquired by Eagle.
-
process
public float[] process(short[] pcm) throws EagleExceptionProcesses a frame of audio and returns a list of similarity scores for each speaker profile.- Parameters:
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. Eagle operates on single-channel audio.- Returns:
- A list of similarity scores for each speaker profile. A higher score indicates that the voice belongs to the corresponding speaker. The range is [0, 1] with 1.0 representing a perfect match.
- Throws:
EagleException- if there is an error while processing audio frames.
-
reset
public void reset() throws EagleExceptionResets the internal state of Eagle Profiler. It should be called before starting a new enrollment session.- Throws:
EagleException- if there is an error while resetting Eagle.
-
getVersion
public java.lang.String getVersion()
Getter for version.- Returns:
- Version.
-
getFrameLength
public int getFrameLength()
Getter for number of audio samples per frame.- Returns:
- Number of audio samples per frame.
-
getSampleRate
public int getSampleRate()
Getter for audio sample rate accepted by Picovoice.- Returns:
- Audio sample rate accepted by Picovoice.
-
-