Media Server 12.11

# TrainAudioMatchClip

Trains Media Server to recognize an audio clip.

Type: asynchronous

Parameter | Description | Required
--- | --- | ---
`audiodata` | The audio data to add. Files must be uploaded as multipart/form-data. For more information about sending data to Media Server, refer to the Media Server Administration Guide. | Set this or `audiopath`
`audiopath` | The path of the file that contains the audio clip. The path must be absolute, or relative to the Media Server executable file. | Set this or `audiodata`
`database` | The name of the database to add the audio clip to. The database must already exist. | Yes
`identifier` | A unique identifier for the clip (maximum 254 bytes). If you do not set this parameter, Media Server generates an identifier automatically. | No
`metadata` | A comma-separated list of metadata key-value pairs to add to the clip. Separate keys from values using a colon (`:`). To include a comma or colon in a key name or value, you must enclose the key name or value in quotation marks (`"`) and escape any quotation marks that occur within the string with a backslash (`\`). | No
`nullaudiodata` | A Boolean value (default false) that specifies whether to discard the audio data when training is complete, rather than storing it in the database. | No

## Example

The following example trains Media Server by sending the path of the audio clip:

    curl http://localhost:14000 -F action=TrainAudioMatchClip
                                -F database=music
                                -F audiopath=clip.wav

Alternatively, you can train Media Server by sending the audio data, for example:

    curl http://localhost:14000 -F action=TrainAudioMatchClip
                                -F database=music
                                -F audiodata=@clip.wav

## Response

This action is asynchronous, so Media Server always returns success accompanied by a token. You can use this token with the QueueInfo action to retrieve the status of your request.

    <autnresponse>
      <action>QUEUEINFO</action>
      <response>SUCCESS</response>
      <responsedata>
        <actions>
          <action>
            <status>Finished</status>
            <queued_time>2018-May-18 07:19:15</queued_time>
            <time_in_queue>0</time_in_queue>
            <process_start_time>2018-May-18 07:19:15</process_start_time>
            <time_processing>8</time_processing>
            <process_end_time>2018-May-18 07:19:23</process_end_time>
            <identifier>8c8f7d414d071b3ba8dcfc8778a77f9d</identifier>
            <token>...</token>
          </action>
        </actions>
      </responsedata>
    </autnresponse>

The `identifier` element contains the identifier that was assigned to the clip.

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.11 | Last updated February 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Media Server 12.11

Topic Title: TrainAudioMatchClip