Open topic with navigation

# AfpAddTrack

The `AfpAddTrack` task allows you to add a new audio track to an audio fingerprint database, reading the data from an audio file or stream and converting it into AFP features before indexing.

If the database does not already exist, it is created by adding the track.

By default, the `AfpAddTrack` task uses acoustic landmark matching. You can set AfpMode to use template-based matching, which is more robust but less scalable.

## Parameters

Parameter | Description | Required
--- | --- | ---
Type | The task name. Set to `AfpAddTrack`. | Yes
AfpDb | The audio fingerprint database (if it is defined in the configuration file). | See Comments
AfpMode | The mode to use for audio fingerprinting. |
AudioUpsampling | Whether to allow audio upsampling if the input audio has a sample rate too low for the task. |
EndTime | The end of an audio section to process. |
File | The name of the audio file to index. | Yes, if InputType is `File`.
InputType | The type of audio to process (file, binary data, or stream). |
Pack | The audio fingerprint database (if it is not defined in the configuration file). | See Comments
PackDir | The path to the directory containing the database. If this directory does not already exist, manually create it before sending the action. If the database does not yet exist, IDOL Speech Server creates the database in this directory. | See Comments
Rnd | A window size within which a random offset shift is calculated. |
Sfreq | The sample frequency of the audio file to process. |
SpecSize | The analysis resolution. |
StartTime | The beginning of an audio section to process. |
SugdInputChannels | The channel layout of the input media file. This parameter does not apply when InputType is `Stream`. |
SugdInputFrequency | The sampling rate of the input media file. This parameter does not apply when InputType is `Stream`. |
Tag | The tag associated with the track being added. | Yes

## Comments

If the database is defined in the IDOL Speech Server configuration file, you must set the AfpDb parameter. If the database is not defined, set both the Pack and PackDir parameters instead.

## Examples

    http://localhost:15000/action=AddTask&Type=AfpAddTrack&File=C:\Data\Jingle.wav&Tag=MyCompanyJingle&PackDir=C:\resources&Pack=Adverts

This action indexes the audio file `Jingle.wav` into the `Adverts` database. If the `Adverts` database does not already exist, IDOL Speech Server creates it. If the clip is subsequently identified in an audio file, IDOL Speech Server identifies it using the tag `MyCompanyJingle`.

    http://localhost:15000/action=AddTask&Type=AfpAddTrack&InputType=Stream&Tag=MyCompanyJingle&PackDir=C:\resources&Pack=Adverts

This action indexes the streamed audio into the `Adverts` database. If the `Adverts` database does not already exist, IDOL Speech Server creates it. If the clip is subsequently identified in an audio file, IDOL Speech Server identifies it using the tag `MyCompanyJingle`.

© 2015-2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm