Skip to content
Assistants

Suggest versions of a word to choose by ear

POST/assistants/{id}/pronunciations/suggest

Hears 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

Request body

  • termstringrequired

    The 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 characters

  • sentencestring

    A 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_base64string

    A 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 send sounds_like instead.

    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_likestring

    How 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

200
  • sounds_likestring

    How 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 characters

  • versionsarray of object

    Up 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.