Suggest versions of a word to choose by ear
/assistants /{id} /pronunciations /suggestHears how the word must sound (a recording of someone saying it, or sounds_like), writes up to five ways to spell it for the assistant's voice, the word as written first, and returns each one said by that voice in sentence.
Path parameters
idstringrequiredID of the assistant, as returned by
GET /assistants.
Request body
application/jsontermstringrequiredThe word or name as it is written in the prompt and as the assistant writes it, e.g. "Swile" or "Thibault Lhuillier". Matched whole-word and case-sensitively.
Example
"Swile"1 to 100 characterssentencestringA sentence holding the word, as the assistant says it (e.g. the prompt's sentence that mentions it), to hear each version in context. Defaults to the word alone.
at most 300 characters
audio_base64stringA recording of someone saying the word the way the voice must say it, base64-encoded without a data: prefix. A few seconds is enough. Send it with
mime_type, or sendsounds_likeinstead.1 to 3000000 characters
mime_typeenum (5 values)Format of the recording.
Possible values
"audio/wav""audio/mpeg""audio/ogg""audio/flac""audio/aac"sounds_likestringHow it must sound, typed instead of a recording: a respelling in the call's language and any note on silent letters or English reading.
Example
"swaïle, une seule syllabe, à l'anglaise"1 to 300 characters
Response
200sounds_likestringHow the word must sound, from the recording or as sent. Send it back to POST /assistants/{id}/pronunciations.
Example
"swaïle, une seule syllabe, à l'anglaise"1 to 300 charactersversionsarray of objectUp to 5 ways to write the word for the assistant's voice, each with its audio, to listen to and choose from.
Errors
- 400Invalid request: a field or parameter failed validation
{ "message"?: string, "error"?: string, "bodyErrors"?: {…} } - 404Not found in your organization
{ "message"?: string, "error"?: string, "bodyErrors"?: {…} }
Error bodies carry an error (or message) string; a 400 adds bodyErrors.issues. See Errors.