Skip to content

Speech synthesis

With speechSynthesis={{ enable: true, lang: 'en' }}, the chatbot reads each bot message out loud with the speech synthesis of the browser. See Speech for more.

  • By default, the chatbot says the text of the message.
  • Set metadata.speak on a step to say a different text. It also supports {previousValue}.
  • Custom components have no text to read, so metadata.speak is the only way to make them speak.
  • Browsers may block the speech until you interact with the page, like typing your name.