Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tech.ivoice.apps.scenarion.bizon;
- import tech.ivoice.platform.sdk.messages.Hangup;
- import tech.ivoice.platform.sdk.messages.Messages;
- import tech.ivoice.platform.sdk.messages.common.PlaySource;
- import tech.ivoice.platform.sdk.messages.session.PlayCollectSpeech;
- import static tech.ivoice.platform.sdk.messages.Messages.playCollectSpeech;
- public class Audios {
- public Audios(){
- }
- public PlayCollectSpeech playColleсtFirstQuestion(String date) {
- return playCollectSpeech(playSourceFirstQuestion(date))
- .setDelayBeforeCollect(12)
- .setKeywords("да,интересно,конечно,очень,ага,нуда,нет,не,иди,пошла")
- .setTimeout(8)
- .setWaitingInputTimeout(4)
- .setSilenceAfterSpeechTimeout(4)
- .setPartialResult(true)
- .build();
- }
- public PlayCollectSpeech playCollectRepeatFirstQuestion(){
- return playCollectSpeech(playSourceRepeatFirstQuestion())
- .setDelayBeforeCollect(12)
- .setKeywords("да,интересно,конечно,очень,ага,нуда,нет,не,иди,пошла")
- .setTimeout(8)
- .setWaitingInputTimeout(4)
- .setSilenceAfterSpeechTimeout(4)
- .setPartialResult(true)
- .build();
- }
- private PlaySource playSourceFirstQuestion(String date) {
- return PlaySource.sequence("wav", PlaySource.speechSynthesis("date"),
- "мы будем рады видеть Вас снова и приглашаем на бесплатную диагностику ходовой части. А так же, если Вы приобретете у нас масло с фильтром или амортизаторы," +
- " мы заменим их совершенно бесплатно."+
- "Вам интересно наше предложение? Скажите ДА или НЕТ.");
- }
- private PlaySource playSourceRepeatFirstQuestion(){
- return PlaySource.urls("Извините, я Вас не поняла. Скажите пожалуйста ДА или НЕТ");
- }
- public PlaySource playSourceIfYes(){
- return PlaySource.urls("Отлично, соединяю с диспетчерской службой.");
- }
- public PlaySource playSourceIfNo(){
- return PlaySource.urls("Спасибо за ответ! Надеемся быть Вам полезными в будущем.");
- }
- public PlaySource playSourceRedirect(){
- return PlaySource.urls("Извините, я Вас не поняла. Соединяю с диспетчерской службой!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement