To replace the name pronunciation file associated with a profile, send a binary audio file to the web address defined in the audio file link returned by the Profile's entry document.
You can only replace the name pronunciation file associated with a profile if you are the profile owner or an administrator. See Authenticating requests
for information about how to authenticate the request.
To replace the name pronunciation file for a profile, complete the following steps:
Table 1. Atom API request details
- Get the service document for the person's profile. See Retrieving the Profiles service document.
- Get the URI of the profiles feed which is specified in the href attribute of the collection element in the service document and use it to get the profiles feed for the person.
- Find the <link rel="http://www.ibm.com/xmlns/prod/sn/pronunciation" .../> element returned in the feed. For example:
rel="http://www.ibm.com/xmlns/prod/sn/pronunciation" type="audio" />
- Send a PUT request to the web address specified in the href attribute.
Note: Be sure to make the new audio file available to the application. For example, if you are writing a Java™ application, you might use a method that extends the EntityEnclosingMethod class to reference the file. Or, you might make the file available by adding it to a file system location that is HTTP addressable.
|PUT||Audio file||Value of the href attribute of the <link rel="http://www.ibm.com/xmlns/prod/sn/pronunciation" .../> element in the user's profiles feed.||"audio/wav" or "audio/x-wav"|
Provide a binary audio file in the format indicated by a Content-Type header.
Returned HTTP headers
HTTP/1.1 200 OK
Indicates that the audio file was successfully updated.Parent topic: Working with pronunciation files
Retrieving a name pronunciation file