Picovoice Wordmark
Start Free
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeWeb
SummaryPicovoice CheetahAzure Real-Time Speech-to-TextAmazon Transcribe StreamingGoogle Streaming ASRMoonshine StreamingVosk StreamingWhisper.cpp Streaming
FAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryAmazon PollyAzure TTSElevenLabsOpenAI TTSPicovoice OrcaChatterbox-TTS-TurboKokoro-TTSKitten-TTS-Nano-0.8-INT8Pocket-TTSNeu-TTS-Nano-Q4-GGUFPiper-TTSSoprano-TTSSupertonic-TTS-2ESpeak-NG
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidCNode.jsPythoniOSWeb
SummaryPicovoice EaglepyannoteSpeechBrain
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice FalconAmazon TranscribeAzure Speech-to-TextGoogle Speech-to-Textpyannote
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeSafariWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeWeb
SummaryPicovoice PorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeSafariWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidArduinoC.NETiOSLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSMicrocontrollerNode.jsPythonWeb
SummaryPicovoice CobraWebRTC VADSilero VAD
FAQ
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Eagle Speaker Recognition
iOS API

API Reference for the Eagle iOS SDK (Cocoapods)


EagleProfiler

public class EagleProfiler: EagleBase { }

Profiler class for the Eagle speaker recognition engine.


EagleProfiler.getAvailableDevices()

public static func getAvailableDevices() throws -> [String]

Retrieves a list of devices that can be specified when constructing EagleProfiler.

Returns

  • [String] : An array of available devices.

Throws

  • EagleError: If an error occurs while retrieving the devices.

EagleProfiler.init()

public init(
accessKey: String,
modelPath: String? = nil,
device: String? = nil,
minEnrollmentChunks: Int = 1,
voiceThreshold: Float = 0.3) throws -> EagleProfiler

Constructor for the EagleProfiler class

Parameters

  • accessKey String : The AccessKey obtained from Picovoice Console.
  • modelPath String? : Absolute path to file containing model parameters (.pv).
  • device String? : String representation of the device (e.g., CPU or GPU) to use. If set to best, the most suitable device is selected automatically. If set to gpu, the engine uses the first available GPU device. To select a specific GPU device, set this argument to gpu:${GPU_INDEX}, where ${GPU_INDEX} is the index of the target GPU. If set to cpu, the engine will run on the CPU with the default number of threads. To specify the number of threads, set this argument to cpu:${NUM_THREADS}, where ${NUM_THREADS} is the desired number of threads.
  • minEnrollmentChunks Int Minimum number of chunks to be processed before enroll returns 100%. The value should be a number greater than or equal to 1. A higher number results in more accurate profiles at the cost of needing more data to create the profile.
  • voiceThreshold Float Sensitivity threshold for detecting voice. The value should be a number within [0, 1]. A higher threshold increases detection confidence values at the cost of potentially missing frames of voice.

Throws

  • EagleError: If an error occurs while creating an instance of EagleProfiler.

EagleProfiler.delete()

public func delete()

Releases resources acquired by EagleProfiler.


EagleProfiler.enroll()

public func enroll(pcm: [Int16]) throws -> Float

Enrolls a speaker.

Parameters

  • pcm [Int16] : An array of audio samples. The audio needs to have a sample rate equal to .sampleRate and be single-channel, 16-bit linearly-encoded. In addition it must be exactly .frameLength samples long.

Returns

  • Float : The percentage of enrollment completed.

Throws

  • EagleError : If an error occurs while processing the pcm array.

EagleProfiler.flush()

public func flush() throws -> Float

Marks the end of the audio stream, flushes internal state of the object and returns the percentage of enrollment completed.

Returns

  • Float : The percentage of enrollment completed.

Throws

  • EagleError : If an error occurs while processing the stored data array.

EagleProfiler.export()

public func export() throws -> EagleProfile

Exports the speaker profile. The exported profile can be used in Eagle or stored for later use.

Returns

  • EagleProfile : An EagleProfile object.

Throws

  • EagleError : If an error occurs while exporting the speaker profile.

EagleProfiler.reset()

public func reset() throws

Resets EagleProfiler and removes all enrollment data. It must be called before enrolling a new speaker.

Throws

  • EagleError : If an error occurs while exporting the speaker profile.

EagleProfiler.frameLength

public static let frameLength: Int

The audio frame length in PCM samples that EagleProfiler accepts.


EagleProfiler.sampleRate

public static let sampleRate: Int

The audio sample rate that EagleProfiler accepts.


EagleProfiler.version

public static let version: String

EagleProfiler version string.


EagleProfile

public class EagleProfile { }

The class representing a speaker profile after enrollment by EagleProfiler. Returned by EagleProfiler.export().


EagleProfile.init()

public init(profileBytes: [UInt8])

Constructor.

Parameters

  • profileBytes [UInt8] : A byte array that was previously obtained via getBytes().

EagleProfile.getBytes()

public func getBytes() -> [UInt8]

Gets a binary representation of the profile.

Returns

  • [UInt8] : A byte array of the profile.

Eagle

public class Eagle: EagleBase { }

Recognizer class for the Eagle speaker recognition engine.


Eagle.getAvailableDevices()

public static func getAvailableDevices() throws -> [String]

Retrieves a list of devices that can be specified when constructing Eagle.

Returns

  • [String] : An array of available devices.

Throws

  • EagleError: If an error occurs while retrieving the devices.

Eagle.init()

Constructors for the Eagle class

public init(
accessKey: String,
speakerProfiles: [EagleProfile],
modelPath: String? = nil,
device: String? = nil,
voiceThreshold: Float = 0.3) throws

Parameters

  • accessKey String : The AccessKey obtained from Picovoice Console.
  • modelPath String? : Absolute path to file containing model parameters (.pv).
  • device String? : String representation of the device (e.g., CPU or GPU) to use. If set to best, the most suitable device is selected automatically. If set to gpu, the engine uses the first available GPU device. To select a specific GPU device, set this argument to gpu:${GPU_INDEX}, where ${GPU_INDEX} is the index of the target GPU. If set to cpu, the engine will run on the CPU with the default number of threads. To specify the number of threads, set this argument to cpu:${NUM_THREADS}, where ${NUM_THREADS} is the desired number of threads.
  • voiceThreshold Float Sensitivity threshold for detecting voice. The value should be a number within [0, 1]. A higher threshold increases detection confidence values at the cost of potentially missing frames of voice.

Throws

  • EagleError: If an error occurs while creating an instance of Eagle.

Eagle.delete()

public func delete()

Releases resources acquired by Eagle.


Eagle.process()

public func enroll(pcm: [Int16]) throws -> [Float]

Processes given audio data and returns speaker likelihood scores.

Parameters

  • pcm [Int16] : An array of audio samples. The audio needs to have a sample rate equal to .sampleRate and be single-channel, 16-bit linearly-encoded. In addition it must be at least minProcessSamples() samples long.
  • speakerProfiles [EagleProfile] : An array of EagleProfile objects obtained from EagleProfiler.

Returns

  • [Float]? : Similarity scores for each enrolled speaker. The scores are in the range [0, 1] with 1 being a perfect match. A result of nil indicates that there was not enough voice in the audio sample to recognize a speaker.

Throws

  • EagleError : If an error occurs while processing the pcm array.

Eagle.reset()

public func reset() throws

Resets the internal state of the Eagle engine. It is best to call before processing a new sequence of audio (e.g. a new voice interaction). This ensures that the accuracy of the engine is not affected by a change in audio context.

Throws

  • EagleError : If an error occurs while resetting.

Eagle.minProcessSamples()

public func minEnrollSamples() throws -> Int

Getter for the minimum length of the input pcm required by process().

Returns

  • Int : Minimum number of samples required for a call to process().

Throws

  • EagleError : If an error occurs.

Eagle.sampleRate

public static let sampleRate: Int

The audio sample rate that Eagle accepts.


Eagle.version

public static let version: String

Eagle version string.


EagleError

public enum EagleError: Error { }

Error type thrown by the Eagle iOS SDK.

case EagleOutOfMemoryError(_ message:String)
case EagleIOError(_ message:String)
case EagleInvalidArgumentError(_ message:String)
case EagleStopIterationError(_ message:String)
case EagleKeyError(_ message:String)
case EagleInvalidStateError(_ message:String)
case EagleRuntimeError(_ message:String)
case EagleActivationError(_ message:String)
case EagleActivationLimitError(_ message:String)
case EagleActivationThrottledError(_ message:String)
case EagleActivationRefusedError(_ message:String)
case EagleInternalError(_ message:String)

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Eagle Speaker Recognition iOS API
  • EagleProfiler
  • getAvailableDevices()
  • init()
  • delete()
  • enroll()
  • flush()
  • export()
  • reset()
  • frameLength
  • sampleRate
  • version
  • EagleProfile
  • init()
  • getBytes()
  • Eagle
  • getAvailableDevices()
  • init()
  • delete()
  • process()
  • reset()
  • minProcessSamples()
  • sampleRate
  • version
  • EagleError
© 2019-2026 Picovoice Inc.PrivacyTerms