Add a Clip to the Database

After creating a database, train Media Server to recognize each audio clip by running the action TrainAudioMatchClip.

To add an audio clip to the database

  • Add a clip using the action TrainAudioMatchClip. For example:

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

    Alternatively, the following example provides the path of the audio clip rather than sending the audio data:

    curl http://localhost:14000/action=TrainAudioMatchClip -F database=Music -F audiopath=clip1.wav

    Media Server adds the clip to the database and returns the identifier.