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 IDOL Speech Server, and set the following parameters:

  `Type` | The task name. Set to `AfpAddTrack`.
  `File` | The audio clip to index into the AFP database. To restrict processing to a section of the audio file, set the `StartTime` and `EndTime` parameters. For more information, see the 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, IDOL Speech Server creates the database in this directory.

For example:

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

This action indexes the audio clip `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 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.

Micro Focus 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 `AfpAddTrack` task with the `InputType` parameter set to `Stream`. For more details, see the IDOL Speech Server Reference.

© 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