Falcon Speaker Diarization
iOS API
API Reference for the iOS Falcon SDK (Cocoapod)
Falcon
Class for the Falcon Speaker Diarization engine.
Resources should be cleaned when you are done using the delete()
function.
Falcon.init()
init
method for Falcon Speaker Diarization engine.
Parameters
accessKey
String : The AccessKey obtained from Picovoice Console.modelPath
String? : Absolute path to file containing model parameters (.pv
).
Throws
FalconError
: If an error occurs while creating an instance of Falcon Speaker Diarization engine.
Falcon.delete()
Releases resources acquired by the Falcon engine.
Falcon.process()
Processes given audio data with the Falcon Speaker Diarization engine.
Parameters
pcm
[Int16] : The incoming audio needs to have a sample rate equal toFalcon.sampleRate
and be 16-bit linearly-encoded. Furthermore, Falcon operates on single-channel audio.
Returns
- [
FalconSegment
] : Sequence of speaker segments with their associated metadata.
Throws
FalconError
: If there is an error while processing the audio frame.
Falcon.processFile()
Processes a given audio file with the Falcon Speaker Diarization engine.
Parameters
audioPath
String : Absolute path to the audio file. The supported formats are:3gp (AMR)
,FLAC
,MP3
,MP4/m4a (AAC)
,Ogg
,WAV
andWebM
.
Returns
- [
FalconSegment
] : Sequence of speaker segments with their associated metadata.
Throws
FalconError
: If there is an error while processing the audio frame.
Falcon.processFile()
Processes a given audio file with the Falcon Speaker Diarization engine.
Parameters
audioURL
URL : URL of the audio file. The supported formats are:3gp (AMR)
,FLAC
,MP3
,MP4/m4a (AAC)
,Ogg
,WAV
andWebM
.
Returns
- [
FalconSegment
] : Sequence of speaker segments with their associated metadata.
Throws
FalconError
: If there is an error while processing the audio frame.
Falcon.sampleRate
Audio sample rate accepted by Falcon.
Falcon.version
Current Falcon version.
FalconError
Error thrown if an error occurs within Falcon Speaker Diarization engine.
FalconSegment
Struct for storing segment metadata returned from the Falcon engine.
FalconSegment.startSec
Start of segment in seconds.
FalconSegment.endSec
End of segment in seconds.
FalconSegment.speakerTag
Speaker tag is a non-negative integer identifying unique speakers.