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

Falcon Speaker Diarization
Web API

API Reference for the Falcon Web SDK (falcon-web).


Falcon

class Falcon {}

Class for the Falcon Speaker Diarization engine.


Falcon.create()

static async function create(
accessKey: string,
model: FalconModel
): Promise<Falcon>

Creates an instance of Falcon Speaker Diarization engine using '.pv' file in public directory. The model size is large, hence it will try to use the existing one if it exists, otherwise saves the model in storage.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • model FalconModel : Object containing Falcon model data.

Returns

  • Falcon : An instance of the Falcon engine.

Falcon.process()

async function process(pcm: Int16Array): Promise<FalconSegments>

Processes audio. The required sample rate can be retrieved from '.sampleRate'. The audio needs to be 16-bit linearly-encoded. Furthermore, the engine operates on single-channel audio.

Parameters

  • pcm Int16Array : Audio data.

Returns

  • FalconSegments : The inferred segments.

Falcon.release()

async function release(): Promise<void>

Releases resources acquired by the Falcon Web SDK.


Falcon.sampleRate

get sampleRate(): number

Audio sample rate accepted by Falcon.


Falcon.version

get version(): string

Falcon version string.


FalconModel

type FalconModel = {
base64?: string;
publicPath?: string;
customWritePath?: string;
forceWrite?: boolean;
version?: number;
}

Falcon model type.


FalconSegments

type FalconSegments = {
segments: FalconSegment[];
}

Falcon segments type.

  • segments FalconSegment[] : Diarization output as an array of segments.

FalconSegment

type FalconSegment = {
startSec: number;
endSec: number;
speakerTag: number;
}

Falcon segment type.

  • startSec number : Position in seconds where the segment starts.
  • endSec number : Position in seconds where the segment ends.
  • speakerTag number : A non-negative integer that identifies unique speakers.

FalconWorker

class FalconWorker {}

A class for creating new instances of FalconWorker.


FalconWorker.create()

static async create(
accessKey: string,
model: FalconModel
): Promise<FalconWorker>

Creates an instance of FalconWorker using '.pv' file in public directory. The model size is large, hence it will try to use the existing one if it exists, otherwise saves the model in storage.

Parameters

  • accessKey string : AccessKey obtained from Picovoice Console.
  • model FalconModel : Object containing Falcon model data.

Returns

  • FalconWorker : An instance of FalconWorker.

FalconWorker.process()

async function process(
pcm: Int16Array,
options?: { transfer?: boolean, transferCallback?: (data: Int16Array) => void }
): Promise<FalconSegments>

Processes audio. The required sample rate can be retrieved from '.sampleRate'. The audio needs to be 16-bit linearly-encoded. Furthermore, the engine operates on single-channel audio.

Parameters

  • pcm Int16Array : Audio data.
  • options Object : Optional process arguments.
  • options.transfer boolean : Optional flag to indicate if the buffer should be transferred or not. If set to true, input buffer array will be transferred to the worker.
  • options.transferCallback (pcm: Int16Array) => void : Optional callback containing a new Int16Array with contents from pcm. Use this callback to get the input pcm when using transfer.

Returns

  • FalconSegments : The inferred segments with metadata.

FalconWorker.release()

async function release(): Promise<void>

Releases resources acquired by the Falcon Web SDK.


FalconWorker.terminate()

async function terminate(): Promise<void>

Force terminates the instance of FalconWorker.


FalconWorker.sampleRate

get sampleRate(): number

Audio sample rate accepted by Falcon.


FalconWorker.version

get version(): string

Falcon version string.

Was this doc helpful?

Issue with this doc?

Report a GitHub Issue
Falcon Speaker Diarization Web API
  • Falcon
  • create()
  • process()
  • release()
  • sampleRate
  • version
  • FalconModel
  • FalconSegments
  • FalconSegment
  • FalconWorker
  • create()
  • process()
  • release()
  • terminate()
  • sampleRate
  • version
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.