This is unreleased documentation for Rasa Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased


TwilioVoiceInput Objects

class TwilioVoiceInput(InputChannel)

Input channel for Twilio Voice.


def name(cls) -> Text

Name of channel.


def from_credentials(cls, credentials: Optional[Dict[Text,
Any]]) -> InputChannel

Load custom configurations.


def __init__(initial_prompt: Optional[Text],
reprompt_fallback_phrase: Optional[Text],
assistant_voice: Optional[Text],
speech_timeout: Text = "5",
speech_model: Text = "default",
enhanced: Text = "false") -> None

Creates a connection to Twilio voice.


  • initial_prompt - text to use to prompt a conversation when call is answered.
  • reprompt_fallback_phrase - phrase to use if no user response.
  • assistant_voice - name of the assistant voice to use.
  • speech_timeout - how long to pause when user finished speaking.
  • speech_model - type of transcription model to use from Twilio.
  • enhanced - toggle to use Twilio's premium speech transcription model.


def blueprint(
on_new_message: Callable[[UserMessage], Awaitable[None]]) -> Blueprint

Defines endpoints for Twilio voice channel.

TwilioVoiceCollectingOutputChannel Objects

class TwilioVoiceCollectingOutputChannel(CollectingOutputChannel)

Output channel that collects send messages in a list.

(doesn't send them anywhere, just collects them).


def name(cls) -> Text

Name of the output channel.


async def send_text_message(recipient_id: Text, text: Text,
**kwargs: Any) -> None

Sends the text message after removing emojis.


async def send_text_with_buttons(recipient_id: Text, text: Text,
buttons: List[Dict[Text, Any]],
**kwargs: Any) -> None

Convert buttons into a voice representation.


async def send_image_url(recipient_id: Text, image: Text,
**kwargs: Any) -> None

For voice channel do not send images.