AddSpeakerAudio
Adds one or more audio samples to a speaker.
Type: synchronous
Parameter | Description | Required |
---|---|---|
audiodata
|
The audio data to add. Send files to Media Server using a multipart/form-data HTTP POST request. | Set this or audiopath |
audiolabels
|
A comma-separated list of labels to identify the audio samples that you are adding (maximum 254 bytes for each label). Every audio sample added to the same speaker must have a unique label, so the number of labels must match the number of samples provided using either audiodata or audiopath . If you do not set this parameter, Media Server generates labels automatically. |
No |
audiopath
|
A comma-separated list of paths to the audio files to add. The paths must be absolute, or relative to the Media Server executable file. | Set this or audiodata |
database
|
The name of the database that contains the speaker. | Yes |
identifier
|
The identifier of the speaker to add the audio samples to. | Yes |
Example
The following example adds audio samples to a speaker, for training the speaker model, by specifying the paths of the audio files with the audiopath
parameter:
/action=AddSpeakerAudio&database=news &identifier=JohnSmith &audiopath=sample1.wav,sample2.wav &audiolabels=sample1,sample2
The following example adds audio samples by sending the audio data:
curl http://localhost:14000/action=AddSpeakerAudio -F database=news -F identifier=JohnSmith -F audiodata=@sample3.wav,sample4.wav -F audiolabels=sample3,sample4
Response
<autnresponse> <action>ADDSPEAKERAUDIO</action> <response>SUCCESS</response> <responsedata></responsedata> </autnresponse>
See Also
After adding sufficient audio samples for a speaker, you can run the action BuildSpeaker.