Open topic with navigation

# AfptAddTrackStream

The `AfptAddTrackStream` task allows you to add a new audio track to the audio fingerprint database, receiving the audio data as a stream and converting it into AFP features before indexing. If the database does not already exist, it is created by adding the track.

The `AfptAddTrackStream` task uses templates as opposed to landmarks, which improves robustness to audio mismatches at the cost of scaleability.

For more information about connecting to an audio stream, see the HPE IDOL Speech Server Administration Guide.

## Parameters

Parameter | Description | Required
--- | --- | ---
Type | The task name. Set to `AfptAddTrackStream`. | Yes
AfpDb | The audio fingerprint database (if it is defined in the configuration file). | *
Pack | The audio fingerprint database (if it is not defined in the configuration file). | *
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, HPE IDOL Speech Server creates the database in this directory. | *
Rnd | A window size within which a random offset shift is calculated. |
Sfreq | The sample frequency of the audio file to process. |
Tag | The tag associated with the track being added. | Yes

Note: The database type for template-based audio fingerprinting is `fptdb` (as opposed to `fpdb` for landmark-based audio fingerprinting).

*If the database is defined in the HPE 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.

## Example

    http://localhost:13000/action=AddTask&Type=AfptAddTrackStream&Tag=MyCompanyJingle&PackDir=C:\resources&Pack=Adverts

This action uses port `13000` to instruct HPE IDOL Speech Server, which is located on the local machine, to use template-based matching to index the streamed audio into the `Adverts` database. If the `Adverts` database does not already exist, HPE IDOL Speech Server creates it. If the clip is subsequently identified in an audio file, HPE IDOL Speech Server identifies it using the tag `MyCompanyJingle`.

© 2014 - 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE 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 AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm