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

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 the token with the QueueInfo action to retrieve the status of the action:

<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.


_FT_HTML5_bannerTitle.htm