Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void doPost(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
- throws IOException {
- VoiceResponse response = new VoiceResponse.Builder()
- .gather(new Gather.Builder()
- .action("/menu/show")
- .numDigits(1)
- .build())
- .say(new Say.Builder("Привет")
- .voice(Say.Voice.ALICE)
- .language(Say.Language.RU_RU)
- .build())
- .build();
- servletResponse.setContentType("text/xml");
- try {
- servletResponse.getWriter().write(response.toXml());
- } catch (TwiMLException e) {
- throw new RuntimeException(e);
- }
- }
Add Comment
Please, Sign In to add comment