Made in Vancouver, Canada by Picovoice
Falcon is an on-device speaker diarization engine. Falcon is:
- Private; All voice processing runs locally.
- Cross-Platform:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Raspberry Pi (4, 3) and NVIDIA Jetson Nano
Speaker diarization, a fundamental step in automatic speech recognition and audio processing, focuses on identifying and separating distinct speakers within an audio recording. Its objective is to divide the audio into segments while precisely identifying the speakers and their respective speaking intervals.
AccessKey is your authentication and authorization token for deploying Picovoice SDKs, including Falcon. Anyone who is using Picovoice needs to have a valid AccessKey. You must keep your AccessKey secret. You would need internet connectivity to validate your AccessKey with Picovoice license servers even though the speaker recognition is running 100% offline.
AccessKey also verifies that your usage is within the limits of your account. Everyone who signs up for
Picovoice Console receives the Free Tier
usage rights described
here. If you wish to increase your limits, you can purchase a subscription plan.
Install the demo package:
pip3 install pvfalcondemo
Run the following in the terminal:
falcon_demo_file --access_key ${ACCESS_KEY} --audio_paths ${AUDIO_PATH}
Replace ${ACCESS_KEY}
with yours obtained from Picovoice Console.
For more information about Python demos go to demo/python.
Build the demo:
cmake -S demo/c/ -B demo/c/build && cmake --build demo/c/build
Run the demo:
./demo/c/build/falcon_demo -a ${ACCESS_KEY} -l ${LIBRARY_PATH} -m ${MODEL_PATH} ${AUDIO_PATH}
Install the Python SDK:
pip3 install pvfalcon
Create an instance of the engine and perform speaker diarization on an audio file:
import pvfalcon
falcon = pvfalcon.create(access_key='${ACCESS_KEY}')
print(falcon.process_file('${AUDIO_PATH}'))
Replace ${ACCESS_KEY}
with yours obtained from Picovoice Console and
${AUDIO_PATH}
to path an audio file.
Finally, when done be sure to explicitly release the resources:
falcon.delete()
Create an instance of the engine and perform speaker diarization on an audio file:
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "pv_falcon.h"
pv_falcon_t *falcon = NULL;
pv_status_t status = pv_falcon_init("${ACCESS_KEY}", "${MODEL_PATH}", &falcon);
if (status != PV_STATUS_SUCCESS) {
// error handling logic
}
int32_t num_segments = 0;
pv_segment_t *segments = NULL;
status = pv_falcon_process_file(falcon, "${AUDIO_PATH}", &num_segments, &segments);
if (status != PV_STATUS_SUCCESS) {
// error handling logic
}
for (int32_t i = 0; i < num_segments; i++) {
pv_segment_t *segment = &segments[i];
fprintf(
stdout,
"Speaker: %d -> Start: %5.2f, End: %5.2f\n",
segment->speaker_tag,
segment->start_sec,
segment->end_sec);
}
pv_falcon_segments_delete(segments);
Replace ${ACCESS_KEY}
with yours obtained from Picovoice Console, ${MODEL_PATH}
to path to
default model file (or your custom one), and ${AUDIO_PATH}
to path an audio file.
Finally, when done be sure to release resources acquired:
pv_falcon_delete(falcon);
- Initial release.
You can find the FAQ here.