Examples of SRApp


Examples of org.speakright.core.flows.SRApp

    chkXmlFile(run, "ref_hello.vxml");
  }
 
  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);
   
   
    BaseTest base = new BaseTest();
    SRInstance run = base.StartIt(flow);
    base.Proceed(run, "222");
View Full Code Here

Examples of org.speakright.core.flows.SRApp

    QFlow flow1 = new QFlow("gram1.grxml", "abcd");
    Prompt p2 = new Prompt("defg");
    p2.setSubIndex(1);
    flow1.addPrompt(p2);
   
    SRApp flow = new SRApp();
    flow.add(flow1);
   
    BaseTest base = new BaseTest();
    base.enableContentLogging();
    SRInstance run = base.StartIt(flow);
    base.Proceed(run, "222");
View Full Code Here

Examples of org.speakright.core.flows.SRApp

    p2.setSubIndex(1);
    p2.setConditionCustom(false); //condition false
   
    flow1.addPrompt(p2);
   
    SRApp flow = new SRApp();
    flow.add(flow1);
   
    BaseTest base = new BaseTest();
    SRInstance run = base.StartIt(flow);
    base.Proceed(run, "222");
//    base.Proceed(run); //b
View Full Code Here

Examples of org.speakright.core.flows.SRApp

    return flow;
  }
 
  public void testRawContent()
  {
    SRApp flow = new SRApp();
    RawContentFlow flow1 = new RawContentFlow();
    flow1.setOutputXMLTag(false);
    String s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
    flow1.setContent(s + "<vxml>abc</vxml>");
    flow.add(flow1);
   
    BaseTest base = new BaseTest();
    SRInstance run = base.StartIt(flow);
    base.Proceed(run, "");
   
View Full Code Here

Examples of org.speakright.core.flows.SRApp

    chkXmlFile(run, "ref_rawcontent.vxml");
  }
 
  public void testRawContentAutoXMLTag()
  {
    SRApp flow = new SRApp();
    RawContentFlow flow1 = new RawContentFlow();
    flow1.setContent("<vxml>abc</vxml>");
    flow.add(flow1);
   
    BaseTest base = new BaseTest();
    SRInstance run = base.StartIt(flow);
    base.Proceed(run, "");
   
View Full Code Here

Examples of org.speakright.core.flows.SRApp

    chkXmlFile(run, "ref_rawcontent.vxml");
  }
 
  public void testGotoUrl()
  {
    SRApp flow = new SRApp();
    GotoUrlFlow flow1 = new GotoUrlFlow("http://www.abc.com/def");
    flow.add(flow1);
   
    BaseTest base = new BaseTest();
    SRInstance run = base.StartIt(flow);
    base.Proceed(run, "");
   
View Full Code Here

Examples of org.speakright.core.flows.SRApp

   
    chkXmlFile(run, "ref_gotourl.vxml");
  }
  public void testRecord()
  {
    SRApp flow = new SRApp();
    RecordAudioFlow flow1 = new RecordAudioFlow();
    flow.add(flow1);
   
    BaseTest base = new BaseTest();
    SRInstance run = base.StartIt(flow);
    base.Proceed(run, "");
   
View Full Code Here

Examples of org.speakright.core.flows.SRApp

    return createApp(doConfirm, false);
  }
 
  TrailWrapper createApp(boolean doConfirm, boolean doSkipList)
  {
        SRApp flow = new SRApp();
        flow.add(new PromptFlow("doing NBEST"));
    if (doConfirm) {
      NBestConfirmerFlow confirmer = new NBestConfirmerFlow("yn.grxml");
      if (doSkipList) {
        confirmer.enableSkipList();
      }
      ConfirmationWrapper cw = new ConfirmationWrapper(new CityQuestion(true), confirmer);
      flow.add(cw);
    }       
    else {
      CityQuestion quest = new CityQuestion(false);
      flow.add(quest);
    }

    flow.add(new PromptFlow("I heard {$M.City}"));
    TrailWrapper wrap1 = new TrailWrapper(flow);
    return wrap1;   
  }
View Full Code Here

Examples of org.speakright.core.flows.SRApp

public class TestGrammar extends BaseTest{
 
  @Test public void sroUrl()
  {
    SRInstance run = CreateInstance(new SRApp(), "", "");
    run.locations().setProjectDir("c:\\apps\\app1");
    run.setSROBaseUrl("http://localhost/app1");
   
    String url = run.locations().makeFullGrammarUrl("$sro$/grammar/digits.grxml");
    assertEquals("url", "http://localhost/app1/grammar/digits.grxml", url);
View Full Code Here

Examples of org.speakright.core.flows.SRApp

  }

  @Test public void SerializePromptsAndGrammars()
  {
    log("---------SerializePromptsAndGrammars-------");
        SRApp flow = new SRApp();
        flow.add(new PFlow("this is the FIRST page"));
        flow.add(new PFlow("and now the SECOND page"));
        flow.add(new QFlow("abc.grxml", "what zxzzsize is it?"));
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
   
    String path = String.format("tmpfiles\\sr_3.out");
    persistentStartIt(wrap1, path);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.