notice

This is unreleased documentation for Rasa Open Source Documentation Master/Unreleased version.
For the latest released documentation, see the latest version (2.7.x).

Version: Master/Unreleased

rasa.core.channels.twilio_voice

TwilioVoiceInput Objects

class TwilioVoiceInput(InputChannel)

Input channel for Twilio Voice.

name

| @classmethod
| name(cls) -> Text

Name of channel.

from_credentials

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

Load custom configurations.

__init__

| __init__(initial_prompt: Optional[Text], reprompt_fallback_phrase: Optional[Text], assistant_voice: Optional[Text], speech_timeout: Optional[Text], speech_model: Optional[Text], enhanced: Optional[Text]) -> None

Creates a connection to Twilio voice.

Arguments:

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

blueprint

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

name

| @classmethod
| name(cls) -> Text

Name of the output channel.

send_text_message

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

Sends the text message after removing emojis.

send_text_with_buttons

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

Convert buttons into a voice representation.

send_image_url

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

For voice channel do not send images.