Adding a name pronunciation file to a profile
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

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 a profile if you are the profile owner or an administrator.

To add a name pronunciation file to a profile, complete the following steps:
1. Get the service document for the person's profile. See Retrieving the Profiles service document ic45Create New Article
2. From the service document, get the URI for the profiles feed which is specified in the href attribute of the collection element and use it to get the profiles feed for the user.
3. In the returned feed, find the value of the href attribute for the link element where the rel attribute has the value "http://www.ibm.com/xmlns/prod/sn/pronunciation" .../>.  Alternatively, use the URI specified in the "Request Details" table below.

<link

href="https://profiles.enterprise.example.com/profiles/audio.do?

key=b559403a-9r32-2c81-c99w-ppq8bb69442j&lastMod=1204662695516"

rel="http://www.ibm.com/xmlns/prod/sn/pronunciation" type="audio" /> 

Note: 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.


4. Use this link to send a PUT request to add the pronunciation file.

You will need a REST client that supports a binary stream of the media file you are trying to add.  Also, there is no ATOM xml payload needed for this operation.

Provide the following items in the HTTP request:

  • A "Content-Type" HTTP header indicating the format of the binary audio data in the payload.  Use "audio/wav" or "audio/x-wav".
  • The binary audio file data in the format indicated by the Content-Type header in the payload of the request.

 

Input
Method URI Description
PUT /profiles/audio.do Found in the href attribute of the <link rel="http://www.ibm.com/xmlns/prod/sn/pronunciation" .../> element in the user's profiles feed.
Name Type Optional Description
key
string No An ID generated by Profiles to identify a certain profile.
Name Type Optional Description
Content-Type
string No A "Content-Type" HTTP header indicating the format of the binary audio data in the payload. Use "audio/wav" or "audio/x-wav".
Output
Code Description
200
OK. Indicates that the request was received successfully.