Picovoice Wordmark
Start Building
Introduction
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryPicovoice picoLLMGPTQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice LeopardAmazon TranscribeAzure Speech-to-TextGoogle ASRGoogle ASR (Enhanced)IBM Watson Speech-to-TextWhisper Speech-to-Text
FAQ
Introduction
AndroidC.NETFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustWeb
SummaryPicovoice Cheetah
FAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidC.NETiOSNode.jsPythonWeb
SummaryAmazon PollyAzure TTSElevenLabsOpenAI TTSPicovoice Orca
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice KoalaMozilla RNNoise
Introduction
AndroidCiOSLinuxmacOSNode.jsPythonRaspberry PiWebWindows
AndroidCNode.jsPythoniOSWeb
SummaryPicovoice EaglepyannoteSpeechBrainWeSpeaker
Introduction
AndroidCiOSLinuxmacOSPythonRaspberry PiWebWindows
AndroidCiOSPythonWeb
SummaryPicovoice FalconAmazon TranscribeAzure Speech-to-TextGoogle Speech-to-Textpyannote
Introduction
AndroidArduinoCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSMicrocontrollerNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaMicrocontrollerNode.jsPythonReactReact NativeRustUnityWeb
SummaryPorcupineSnowboyPocketSphinx
Wake Word TipsFAQ
Introduction
AndroidCChrome.NETEdgeFirefoxFlutteriOSJavaLinuxmacOSNode.jsPythonRaspberry PiReactReact NativeRustSafariUnityWebWindows
AndroidC.NETFlutteriOSJavaNode.jsPythonReactReact NativeRustUnityWeb
SummaryPicovoice RhinoGoogle DialogflowAmazon LexIBM WatsonMicrosoft LUIS
Expression SyntaxFAQ
Introduction
AndroidC.NETiOSLinuxmacOSNode.jsPythonRaspberry PiRustWebWindows
AndroidC.NETiOSNode.jsPythonRustWeb
SummaryPicovoice CobraWebRTC VAD
FAQ
Introduction
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
AndroidC.NETFlutteriOSNode.jsPythonReact NativeRustUnityWeb
Introduction
C.NETNode.jsPython
C.NETNode.jsPython
FAQGlossary

Eagle Speaker Recognition
C API

API Reference for the Eagle C SDK.


pv_eagle_profiler_t

typedef struct pv_eagle_profiler pv_eagle_profiler_t;

Struct representing the profiler component of the Eagle Speaker Recognition engine.


pv_eagle_profiler_init()

pv_status_t pv_eagle_profiler_init(
const char *access_key,
const char *model_path,
pv_eagle_profiler_t **object);

Creates an instance of the profiler component of the Eagle Speaker Recognition engine. Resources should be cleaned when you are done using the pv_eagle_profiler_delete() function.

Parameters

  • access_key const char * : AccessKey obtained from Picovoice Console.
  • model_path const char * : Absolute path to the file containing model parameters (.pv).
  • object pv_eagle_profiler_t * * : Constructed instance of the Eagle profiler.

Returns

  • pv_status_t : Status code.

pv_eagle_profiler_delete()

void pv_eagle_profiler_delete(pv_eagle_profiler_t *object);

Releases resources acquired by the Eagle profiler.

Parameters

  • object pv_eagle_profiler_t * : Eagle profiler object.

pv_eagle_profiler_enroll()

pv_status_t pv_eagle_profiler_enroll(
pv_eagle_profiler_t *object,
const int16_t *pcm,
int32_t num_samples,
pv_eagle_profiler_enroll_feedback_t *feedback,
float *percentage);

Enrolls a speaker. This function should be called multiple times with different utterances of the same speaker until percentage reaches 100.0. Any further enrollment can be used to improve the speaker voice profile. The minimum number of required samples can be obtained by calling pv_eagle_profiler_enroll_min_audio_length_samples(). The audio data used for enrollment should satisfy the following requirements:

  • only one speaker should be present in the audio
  • the speaker should be speaking in a normal voice (i.e. not whispering or shouting)
  • the audio should contain no speech from other speakers and no other sounds (e.g. music)
  • it should be captured in a quiet environment with no background noise

Parameters

  • object pv_eagle_profiler_t * : Eagle profiler object.

  • pcm int16_t : Audio data. The required sample rate can be attained by calling pv_sample_rate(). The required audio format is 16-bit linearly-encoded single-channel PCM. The minimum audio length required for enrollment can be attained by calling pv_eagle_profiler_enroll_min_audio_length_samples().

  • num_samples int32_t : Number of audio samples in pcm.

  • feedback pv_eagle_profiler_enroll_feedback_t * : Feedback code. If any problems arise with the provided input audio, it will be assigned a suitable feedback code to indicate the potential issue:

    • PV_EAGLE_PROFILER_ENROLL_FEEDBACK_AUDIO_TOO_SHORT: The audio is too short, i.e. it contains less than the minimum number of required samples,
    • PV_EAGLE_PROFILER_ENROLL_FEEDBACK_UNKNOWN_SPEAKER: The speaker is unknown, i.e. the speaker is not the same as the one enrolled in the previous enrollment,
    • PV_EAGLE_PROFILER_ENROLL_FEEDBACK_NO_VOICE_FOUND: The audio does not contain any speech,
    • PV_EAGLE_PROFILER_ENROLL_FEEDBACK_QUALITY_ISSUE: The audio is too noisy or the speaker is speaking in a low voice.

    otherwise, it will be set to PV_EAGLE_PROFILER_ENROLL_FEEDBACK_AUDIO_OK.

  • percentage float : Percentage of enrollment progress. When this value reaches 100.0, the enrollment process is complete.

Returns

  • pv_status_t : Status code.

pv_eagle_profiler_enroll_min_audio_length_samples()

pv_status_t pv_eagle_profiler_enroll_min_audio_length_samples(
const pv_eagle_profiler_t *object,
int32_t *num_samples);

Gets the minimum length of the input pcm required by pv_eagle_profiler_enroll().

Parameters

  • object pv_eagle_profiler_t * : Eagle profiler object.

Returns

  • pv_status_t : Status code.

pv_eagle_profiler_export()

pv_status_t pv_eagle_profiler_export(
const pv_eagle_profiler_t *object,
void *speaker_profile);

Exports the speaker profile to a buffer. The exported profile can be used in pv_eagle_init() or stored for later use.

Parameters

  • object pv_eagle_profiler_t * : Eagle profiler object.
  • speaker_profile void * : Buffer where the speaker profile will be stored. Must be pre-allocated with a size obtained by calling pv_eagle_profiler_export_size().

Returns

  • pv_status_t : Status code.

pv_eagle_profiler_reset()

pv_status_t pv_eagle_profiler_reset(pv_eagle_profiler_t *object);

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

Parameters

  • object pv_eagle_profiler_t * : Eagle profiler object.

Returns

  • pv_status_t : Status code.


pv_eagle_profiler_enroll_feedback_t

typedef enum {
PV_EAGLE_PROFILER_ENROLL_FEEDBACK_AUDIO_OK = 0,
PV_EAGLE_PROFILER_ENROLL_FEEDBACK_AUDIO_TOO_SHORT,
PV_EAGLE_PROFILER_ENROLL_FEEDBACK_UNKNOWN_SPEAKER,
PV_EAGLE_PROFILER_ENROLL_FEEDBACK_NO_VOICE_FOUND,
PV_EAGLE_PROFILER_ENROLL_FEEDBACK_QUALITY_ISSUE,
} pv_eagle_profiler_enroll_feedback_t;

Enrollment feedback enum.


pv_eagle_profiler_enroll_feedback_to_string()

const char *pv_eagle_profiler_enroll_feedback_to_string(pv_eagle_profiler_enroll_feedback_t feedback);

Parameters

  • status int32_t : Feedback code.

Returns

  • const char * : String representation of feedback code.

pv_eagle_t

typedef struct pv_eagle pv_eagle_t;

Struct representing the recognizer component of the Eagle Speaker Recognition engine.


pv_eagle_init()

pv_status_t pv_eagle_init(
const char *access_key,
const char *model_path,
int32_t num_speakers,
const void *const *speaker_profiles,
pv_eagle_t **object);

Creates an instance of the recognizer component of the Eagle Speaker Recognition engine. Resources should be cleaned when you are done using the pv_eagle_delete() function.

Parameters

  • access_key const char * : AccessKey obtained from Picovoice Console.
  • model_path const char * : Absolute path to the file containing model parameters (.pv).
  • num_speakers int32_t : Number of speakers to enroll.
  • speaker_profiles const void * const * : Speaker profiles. This can be created using the EagleProfiler object and its related functions.
  • object pv_eagle_t * : Constructed instance of the Eagle engine.

Returns

  • pv_status_t : Status code.

pv_eagle_delete()

void pv_eagle_delete(pv_eagle_t *object);

Releases the resources acquired by the Eagle engine.

Parameters

  • object pv_eagle_t * : Eagle object.

Returns

  • pv_status_t : Status code.

pv_eagle_process()

pv_status_t pv_eagle_process(
pv_eagle_t *object,
const int16_t *pcm,
float *scores);

Processes a frame of the incoming audio stream. The incoming audio needs to have a sample rate equal to pv_sample_rate().

Parameters

  • object pv_eagle_t * : Eagle object.
  • pcm const int16_t * : A frame of audio samples. The number of samples per frame can be attained by calling pv_eagle_frame_length(). The incoming audio needs to have a sample rate equal to pv_sample_rate() and be 16-bit linearly-encoded. Eagle operates on single-channel audio.
  • scores float * : Similarity scores for each enrolled speaker. Must be pre-allocated with a size equal to the number of enrolled speakers. The scores are in the range [0, 1] with 1 being a perfect match.

Returns

  • pv_status_t : Status code.

pv_eagle_reset()

pv_status_t pv_eagle_reset(pv_eagle_t *object);

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.

Parameters

  • object pv_eagle_t * : Eagle object.

Returns

  • pv_status_t : Status code.

pv_eagle_frame_length()

int32_t pv_eagle_frame_length(void);

Getter for number of audio samples per frame.

Returns

  • int32_t : Frame length.

pv_eagle_version()

const char *pv_eagle_version(void);

Getter for version.

Returns

  • const char * : Eagle version.

pv_sample_rate()

int32_t pv_sample_rate(void);

Audio sample rate accepted by Eagle.

Returns

  • int32_t : Sample rate.

pv_status_t

typedef enum {
PV_STATUS_SUCCESS = 0,
PV_STATUS_OUT_OF_MEMORY,
PV_STATUS_IO_ERROR,
PV_STATUS_INVALID_ARGUMENT,
PV_STATUS_STOP_ITERATION,
PV_STATUS_KEY_ERROR,
PV_STATUS_INVALID_STATE,
PV_STATUS_RUNTIME_ERROR,
PV_STATUS_ACTIVATION_ERROR,
PV_STATUS_ACTIVATION_LIMIT_REACHED,
PV_STATUS_ACTIVATION_THROTTLED,
PV_STATUS_ACTIVATION_REFUSED
} pv_status_t;

Status code enum.


pv_status_to_string()

const char *pv_status_to_string(pv_status_t status);

Parameters

  • status int32_t : Status code.

Returns

  • const char * : String representation of status code.

pv_get_error_stack()

pv_status_t pv_get_error_stack(
char ***message_stack,
int32_t *message_stack_depth);

If a function returns a failure (any pv_status_t other than PV_STATUS_SUCCESS), this function can be called to get a series of error messages related to the failure. This function can only be called only once per failure status on another function. The memory for message_stack must be freed using pv_free_error_stack.

Regardless of the return status of this function, if message_stack is not NULL, then message_stack contains valid memory. However, a failure status on this function indicates that future error messages may not be reported.

Parameters

  • message_stack const char * * * : Array of messages relating to the failure. Messages are NULL terminated strings. The array and messages must be freed using pv_free_error_stack().
  • message_stack_depth int32_t * : The number of messages in the message_stack array.

Returns

  • pv_status_t : Returned status code.

pv_free_error_stack()

void pv_free_error_stack(char **message_stack);

This function frees the memory used by error messages allocated by pv_get_error_stack().

Parameters

  • message_stack const char * * * : Array of messages relating to the failure.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Eagle Speaker Recognition C API
  • pv_eagle_profiler_t
  • pv_eagle_profiler_init()
  • pv_eagle_profiler_delete()
  • pv_eagle_profiler_enroll()
  • pv_eagle_profiler_enroll_min_audio_length_samples()
  • pv_eagle_profiler_export()
  • pv_eagle_profiler_reset()
  • pv_eagle_profiler_enroll_feedback_t
  • pv_eagle_profiler_enroll_feedback_to_string()
  • pv_eagle_t
  • pv_eagle_init()
  • pv_eagle_delete()
  • pv_eagle_process()
  • pv_eagle_reset()
  • pv_eagle_frame_length()
  • pv_eagle_version()
  • pv_sample_rate()
  • pv_status_t
  • pv_status_to_string()
  • pv_get_error_stack()
  • pv_free_error_stack()
Voice AI
  • Leopard Speech-to-Text
  • Cheetah Streaming Speech-to-Text
  • Orca Text-to-Speech
  • Koala Noise Suppression
  • Eagle Speaker Recognition
  • Falcon Speaker Diarization
  • Porcupine Wake Word
  • Rhino Speech-to-Intent
  • Cobra Voice Activity Detection
Local LLM
  • picoLLM Inference
  • picoLLM Compression
  • picoLLM GYM
Resources
  • Docs
  • Console
  • Blog
  • Use Cases
  • Playground
Sales & Services
  • Consulting
  • Foundation Plan
  • Enterprise Plan
  • Enterprise Support
Company
  • About us
  • Careers
Follow Picovoice
  • LinkedIn
  • GitHub
  • X
  • YouTube
  • AngelList
Subscribe to our newsletter
Terms of Use
Privacy Policy
© 2019-2025 Picovoice Inc.