Note: There might be a slight delay the first time you authenticate as the SDK downloads and installs necessary updates
Generate Fingerprint
Before performing any searches you need to generate a fingerprint from a media file:
# CREATE AUDIO FINGERPRINT FROM MEDIA FILEft = client.fingerprint_file("/path/to/file.mp3", pex.FingerprintType.AUDIO)# CREATE MELODY FINGERPRINT FROM MEDIA FILEft = client.fingerprint_file("/path/to/file.mp3", pex.FingerprintType.MELODY)# CREATE AUDIO FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILEft = client.fingerprint_buffer([]byte, pex.FingerprintType.AUDIO)# CREATE MELODY FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILEft = client.fingerprint_buffer([]byte, pex.FingerprintType.MELODY)
// CREATE AUDIO FINGERPRINT FROM MEDIA FILEft, err := client.FingerprintFile(inputFile, pex.FingerprintTypeAudio)if err !=nil {panic(err)}// CREATE MELODY FINGERPRINT FROM MEDIA FILEft, err := client.FingerprintFile(inputFile, pex.FingerprintTypeMelody)if err !=nil {panic(err)}// CREATE AUDIO FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILEft, err := client.FingerprintBuffer([]byte, pex.FingerprintTypeAudio)if err !=nil {panic(err)}// CREATE MELODY FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILEft, err := client.FingerprintBuffer([]byte, pex.FingerprintTypeMelody)if err !=nil {panic(err)}
// CREATE AUDIO FINGERPRINT FROM MEDIA FILE$ft = $client->fingerprintFile(INPUT_FILE, [Pex\FingerprintType::Audio]);// CREATE MELODY FINGERPRINT FROM MEDIA FILE$ft = $client->fingerprintFile(INPUT_FILE, [Pex\FingerprintType::Melody]);// CREATE AUDIO FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILE$ft = $client->fingerprintBuffer([]byte, [Pex\FingerprintType::Audio]);// CREATE MELODY FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILE$ft = $client->fingerprintBuffer([]byte, [Pex\FingerprintType::Melody]);
// CREATE AUDIO FINGERPRINT FROM MEDIA FILElet ft =awaitclient.fingerprintFile("video.mp4", [pex.AUDIO])// CREATE MELODY FINGERPRINTlet ft =awaitclient.fingerprintFile("video.mp4", [pex.MELODY])// CREATE AUDIO FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILElet ft =awaitclient.fingerprintBuffer([]byte, [pex.AUDIO])// CREATE MELODY FINGERPRINT FROM BYTE BUFFER HOLDING A MEDIA FILElet ft =awaitclient.fingerprintBuffer([]byte, [pex.MELODY])
Note: When creating audio fingerprints, the SDK uses a single CPU. For melody fingerprints, the SDK uses two CPUs, if available.
If you need to process larger volumes of files, running computations in parallel is recommended. This can significantly improve processing capacity.
For information on the difference between audio and melody fingerprints and the use cases they address, please see our FAQ page
Search Functionality
Initiate Search
Once the fingerprint has been generated, you are ready to initiate a search: