Open topic with navigation

# Add Clips to a Database

You must add all clips to recognize to an AFP database.

To add an audio clip to an AFP database

- Send an `AddTask` action to HPE IDOL Speech Server, and set the following parameters:

  `Type` | The task name. Set to `AfpAddTrackWav`.
  `File` | The audio clip to index into the AFP database. To restrict processing to a section of the audio file, set the start and end times in the `wav` module (for information about how to configure the `wav` module, see the HPE IDOL Speech Server Reference).
  `Tag` | The name to return in the results if the clip is identified in the audio.

  To add the clip to a database that is already defined in the tasks configuration file, you must set the `AfpDb` parameter. If the database is not defined, set both the `Pack` and `PackDir` parameters instead.

  `AfpDb` | The name of a database that is defined in the tasks configuration file.
  `Pack` | The name of a database that is not defined in the tasks configuration file.
  `PackDir` | The path to the directory that contains the database files. If this directory does not already exist, manually create it before you send the action. If the database does not yet exist, HPE IDOL Speech Server creates the database in this directory.

For example:

    http://localhost:13000/action=AddTask&Type=AfpAddTrackWav&File=C:\Data\Jingle.wav&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 index the audio clip `Jingle.wav` 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 with the tag `MyCompanyJingle`.

This action returns a token. You can use the token to check the task status. See Check the Status of a Task.

HPE recommends that you optimize the database after you add new clips (see Optimize a Database). The optimizing procedure improves the database lookup functions.

To add a streamed audio track to the database, use the `AfpAddTrackStream` task. For more details, see the HPE IDOL Speech Server Reference.

© 2013-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