Home
Add a name pronunciation file to a profile
To add a name pronunciation file to a profile, send an Atom entry document containing a reference to the audio file to the user's Profile.
You can only add a name pronunciation file to the profile of the user whose credentials you use to authenticate with the server. See Authenticating requests for information about how to authenticate the request. To add a name pronunciation file to a profile...
- 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:
<link href="https://profiles.enterprise.acme.com/profiles/audio.do? key=b559403a-9r32-2c81-c99w-ppq8bb69442j&lastMod=1204662695516" rel="http://www.ibm.com/xmlns/prod/sn/pronunciation" type="audio" />
- Send a POST request to the Web address specified in the href attribute.
Be sure to make the 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.
Atom API request details
Method Resource URI Input representation PUT Audio file Found in 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"
Input
Provide the following items in the HTTP request:
- A "Content-Type" HTTP header indicating the format of the binary audio data in the payload
- The binary audio file data in the format indicated by the Content-Type header in the payload of the request.
Output
None. Returned HTTP Headers
- HTTP/1.1 200 OK
- Indicates that the request succeeded.
Working with pronunciation files