Package org.speakright.core.flows

Examples of org.speakright.core.flows.QuestionFlow


  }
 
  public void testYouSaid()
  {
    SRApp flow = new SRApp();
    QuestionFlow flow1 = new QuestionFlow("ghi.grxml", "what zoo?");
    YouSaidFlow flow2 = new YouSaidFlow();
    flow.add(flow1);
    flow.add(flow2);
   
   
View Full Code Here


 
  @Test public void gslGrammar()
  {
    m_useMockPageWriter = true;

    QuestionFlow flow = new QuestionFlow("abc.gram", "what size?");
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = StartIt(wrap1);
    ChkPage("abc.gram");
    assertEquals("grxml", false, m_item.isGRXML());
View Full Code Here

  }
  @Test public void xmlGrammar()
  {
    m_useMockPageWriter = true;

    QuestionFlow flow = new QuestionFlow("abc.grxml#Rule1", "what size?");
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = StartIt(wrap1);
    ChkPage("abc.grxml#Rule1");
    assertEquals("grxml", true, m_item.isGRXML());
View Full Code Here

      
        flow.add(new PFlow("this is the FIRST page MONDAY 28"));
        flow.add(new PFlow("and now the SECOND page of my speech application."));
//        flow.add(new QFlow("abc.grxml", "what size is it?"));

        QuestionFlow qflow = new QuestionFlow("", "what size? {audio:welcome.wav}");
    InlineGrammar gram = new InlineGrammar("yes no");
    gram.addBinding("confirm", "city");
    qflow.addGrammar(gram);
    flow.add(qflow);
       
        flow.add(new PFlow("back from the big question. City is {$M.city} {audio:audio/Greeting.wav}"));
        return flow;
  }
View Full Code Here

      add(new PromptFlow("g'day!"));
//      add(new QuestionFlow("abc.gxml", "what size? {audio:welcome.wav}"));
//      QuestionFlow flow = new QuestionFlow("builtin:digits", "what size? {audio:welcome.wav}");
//      flow.addBinding("city", "city");
     
      QuestionFlow flow = new QuestionFlow("", "what size? {audio:welcome.wav}");
//      flow.addBinding("confirm", "city");
//      InlineGrammar gram = new InlineGrammar("yes no");
//      gram.setSlotName("confirm");
//      flow.addGrammar(gram);
      flow.addGrammar("grammar/gram1.grxml");
      flow.addBinding("MySlot", "city"); //must be after add gram
     
      add(flow);
//      SRAskNumber ask  = new SRAskNumber("how many bottles?", "bottles", 3, 10);
//      ask.setMin(3);
//      ask.setMax(10);
View Full Code Here

    public Model M;

    public MainMenu() {
      super("mainmenu");
      String s = "Main Menu.  You can say: choose character, voting results, call statistics, speakright, or goodbye.";
      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"));
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);
    TrailWrapper wrap1 = new TrailWrapper(flow);
View Full Code Here

TOP

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

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.