GetSpeakerAudio
Returns an audio sample that is associated with a speaker.
Type: synchronous
Parameter | Description | Required |
---|---|---|
audiolabel
|
The label of the audio sample. | Yes |
database
|
The name of the database that contains the speaker. | Yes |
format
|
The format of the returned audio. The default is
If you do not specify a format, but specify a file name with the |
No |
identifier
|
The identifier of the speaker. | Yes |
You can also set the parameters Output and FileName to write the output of this action to a file.
Example
The following example downloads an audio sample and writes it to the file "audio.wav".
curl http://localhost:14000/action=GetSpeakerAudio -F database=news -F identifier=newsreader -F audiolabel=sample1 -o audio.wav
Response
The response contains the audio data. Media Server sets the Content-Type
header to the appropriate MIME type, for example audio/wav
. The Content-Length
header is set to the length of the audio data in bytes.
If an error occurs, Media Server returns a standard XML error response.