Package org.speakright.core.flows

Examples of org.speakright.core.flows.PromptFlow


    chkXmlFile(run, "ref_tripleitem.vxml");
  }
  public void testAudioPause()
  {
    PromptFlow flow = new PromptFlow("audio:audio/daisy.wav" + "{..}");

    BaseTest base = new BaseTest();
    SRInstance run = base.StartIt(flow);

    chkXmlFile(run, "ref_audiopause.vxml");
View Full Code Here


    doPrompt(text, expected, true);
  }
  void doPrompt(String text, String expected, boolean success)
  {
    System.out.println("doPrompt....." + text);
    PromptFlow flow = new PromptFlow(text)
    SRInstance run = renderBodyOnly(flow);
    SRError err = new SRError();
    run.failed(err);
    System.out.println("WWWWWWWWW" + err);
    assertEquals("err", !success, run.failed(new SRError()));
View Full Code Here

  public Model M;
   
  @Override
  protected IFlow createWelcome()
  {
    return new PromptFlow("id:welcome");
  }
View Full Code Here

   
    @Override
    public IFlow onYes() {
      if (M.getHaveVoted()) {
        String ptext = "You can only vote once per phone call.";
        return new FlowList(new PromptFlow("AlreadyVoted", ptext), App.BRANCH_MAIN_MENU);
      }
      recordVote();
     
      String ptext = "Your vote has been recorded.";
      return new FlowList(new PromptFlow("SayVoted", ptext), App.BRANCH_MAIN_MENU);
    }
View Full Code Here

      QuestionFlow quest = new QuestionFlow("inline:character results statistics speakright goodbye", s);
      setChoiceQuestion(quest);
     
      addChoice("character", new AppEvent(App.BRANCH_START_AGAIN));
      addChoice("results", new VotingResultsList());
      addChoice("statistics", new PromptFlow("This feature has not yet been implemented.")); //new CustomEvent("restart"));
      addChoice("speakright", new PromptFlow("SpeakRight is an open-source Java framework for speech applications using Voice XML."));
      addChoice("goodbye", new DisconnectFlow("Goodbye."));
    }
View Full Code Here

  }
 
  TrailWrapper createApp()
  {
        SRApp flow = new SRApp();
        flow.add(new PromptFlow("hey"));
        QuestionFlow quest = new QuestionFlow("abc.grxml", "What size?");
        YesNoConfirmerFlow confirmer = new YesNoConfirmerFlow("yn.grxml");
        confirmer.setName("ConfYNFlow");
        ConfirmationWrapper cw = new ConfirmationWrapper(quest, confirmer);
        flow.add(cw);
View Full Code Here

  }
 
  @Test public void confirmModel()
  {
        SRApp flow = new SRApp();
        flow.add(new PromptFlow("hey"));
        AskCityFlow quest = new AskCityFlow();
        YesNoConfirmerFlow confirmer = new YesNoConfirmerFlow("yn.grxml");
        confirmer.setName("ConfYNFlow");
        ConfirmationWrapper cw = new ConfirmationWrapper(quest, confirmer);
        flow.add(cw);
View Full Code Here

   * message and continue.  To change this behaviour, override this method
   * and either throw an event or return a sub-flow object to run.
   */
  @Override
  public IFlow onTransferFailed(IFlow current, SRResults results) {
    PromptFlow flow = new PromptFlow(m_transferFailedPrompt);
    flow.setName(name() + "_Failed");
    return flow;
  }
View Full Code Here

TOP

Related Classes of org.speakright.core.flows.PromptFlow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.