Open topic with navigation

# View the Database Contents

You can return a list of all tracks in an AFP database.

To return the contents of an AFP database

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

  `Type` | The task type. Set to `AfpDatabaseInfo`.
  `Out` | The log file to write the database contents to.

  To view the contents of a database that is defined in the HPE IDOL Speech Server 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.

For example:

    http://localhost:13000/action=AddTask&Type=AfpDatabaseInfo&Pack=Adverts&PackDir=C:\resources&Out=AdvertsDb.ctm

This action uses port `13000` to instruct HPE IDOL Speech Server, which is located on the local machine, to write the contents of the `Adverts` database to the `AdvertsDb.ctm` file.

This action returns a token. You can use the token to:

- Check the task status. See Check the Status of a Task.
- Retrieve the database contents file. See Find Recommended Language Resources to Use in a Task.

The following XML is an example of a database information log file:

    <afpdb_info>
    	<afpdb_track_record>
    		<id>0</id>
    		<tag>ADVERT1</tag>
    		<start>0</start>
    		<length>3384</length>
    	</afpdb_track_record>
    	<afpdb_track_record>
    		<id>1</id>
    		<tag>ADVERT2</tag>
    		<start>0</start>
    		<length>1858</length>
    	</afpdb_track_record>
    	<afpdb_track_record>
    		<id>2</id>
    		<tag>MUSIC1</tag>
    		<start>0</start>
    		<length>24000</length>
    	</afpdb_track_record>
    	<afpdb_track_record>
    		<id>2</id>
    		<tag>MUSIC1</tag>
    		<start>24000</start>
    	<length>11412</length>
    	</afpdb_track_record>
    </afpdb_info>

This example shows that the database contains three tracks: `ADVERT1`, `ADVERT2`, and `MUSIC1`. It displays the length of each track (in frames, where 1 frame is 10 milliseconds). It also displays the start point of the track with respect to the original audio that was indexed. This value is usually 0. However, if the audio that was indexed was longer than four minutes, it is stored in several four-minute chunks. `MUSIC1` appears twice in the example because the original file was longer than four minutes, and was therefore split into two chunks. The first chunk lasts from 0-240s, and the second chunk lasts from 240-354s.

Note: The precise content of the fields might differ slightly depending on whether you are using the landmark-based or the template-based approach.

Note: If you attempt to delete a clip that has been split into chunks (such as `MUSIC1`), all the chunks are deleted (all share the same tag).

© 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