Class PromptCreator
java.lang.Object
com.sinch.sdk.domains.voice.models.v2.helpers.PromptCreator
Fluent creator of a menu prompt, given to the lambdas of
MenuItemCreator.prompt and
Menu.prompt(java.util.function.Consumer<com.sinch.sdk.domains.voice.models.v2.helpers.PromptCreator>)
Messages are played in the order they are added, at most 10.
- Since:
- 2.4
-
Method Summary
Modifier and TypeMethodDescriptionallowBargeIn(boolean allowBargeIn) Set whether user input interrupts the prompt.Add an audio file to playAdd a text-to-speech message in SSMLAdd a text-to-speech message in SSMLAdd a text-to-speech message in plain textAdd a text-to-speech message in plain text
-
Method Details
-
text
Add a text-to-speech message in plain text- Parameters:
text- Text to synthesizevoiceName- Voice used for speech synthesis- Returns:
- This creator
- Since:
- 2.4
-
text
Add a text-to-speech message in plain text- Parameters:
text- Text to synthesizevoiceName- Voice used for speech synthesis, from the catalog- Returns:
- This creator
- Since:
- 2.4
-
ssml
Add a text-to-speech message in SSML- Parameters:
ssml- SSML document (<speak>...</speak>) to synthesizevoiceName- Voice used for speech synthesis- Returns:
- This creator
- Since:
- 2.4
-
ssml
Add a text-to-speech message in SSML- Parameters:
ssml- SSML document (<speak>...</speak>) to synthesizevoiceName- Voice used for speech synthesis, from the catalog- Returns:
- This creator
- Since:
- 2.4
-
play
Add an audio file to play- Parameters:
url- URL of the media to play- Returns:
- This creator
- Since:
- 2.4
-
allowBargeIn
Set whether user input interrupts the prompt. The API default istrue- Parameters:
allowBargeIn-falseto play the whole prompt before evaluating the input, which is still collected during playback- Returns:
- This creator
- Since:
- 2.4
-