notice
This is documentation for Rasa & Rasa Pro Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).
Version: 2.x
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.