Exemplo n.º 1
0
    public static bool run(strList words)
    {
        string cmd = words.shift();

        if (cmd == "curid")
        {
            return(curId());
        }
        if (cmd == "info")
        {
            return(cmdVoiceDescribe.info(words));
        }
        if (cmd == "list")
        {
            return(cmdVoiceDescribe.list(words));
        }
        if (cmd == "select")
        {
            return(cmdVoiceSelect.run(words));
        }
        if (cmd == "vol")
        {
            return(cmdSpeechVolume(words.getOr(0)));
        }
        if (cmd == "rate")
        {
            return(cmdSpeechRate(words.getOr(0)));
        }
        return(Program.errUnsuppCmd());
    }
Exemplo n.º 2
0
    public static bool run(strList words)
    {
        string how = words.shift();

        if (how == "arg")
        {
            return(exact(String.Join(" ", words)));
        }
        if (how == "next")
        {
            return(exact(Program.readLn()));
        }
        if (how == "until")
        {
            return(untilMark(words.getOr(0)));
        }
        if (how == "decode")
        {
            return(decode(words));
        }
        if (how == "_debug_dump_json")
        {
            return(dumpTextAsJson());
        }
        return(Program.errUnsuppCmd());
    }
Exemplo n.º 3
0
    public static bool run(strList words)
    {
        string how = words.shift();

        if (how == "id")
        {
            return(byId(words));
        }
        if (how == "namepart")
        {
            return(byNamePart(words.getOr(0)));
        }
        return(Program.errUnsuppCmd());
    }
Exemplo n.º 4
0
    public static bool cmd(strList words = null)
    {
        if (words == null)
        {
            string ln = readLn();
            if (ln == null)
            {
                return(die("quit"));
            }
            words = strList.splitWords(ln);
        }
        if (words.Count < 1)
        {
            return(true);
        }
        string cmd = words.shift();

        if (cmd == "#")
        {
            return(true);
        }
        if (cmd == "must")
        {
            return(cmdMust(words));
        }
        if (cmd == "quit")
        {
            return(die("quit"));
        }
        if (cmd == "flag")
        {
            return(cmdFlag(words));
        }
        if (cmd == "interactive")
        {
            return(cmdInteractive());
        }
        if (cmd == "voice")
        {
            return(cmdVoice.run(words));
        }
        if (cmd == "vol")
        {
            return(cmdMasterVolume(words.getOr(0)));
        }
        if (cmd == "audio_output")
        {
            return(cmdOutput(words));
        }
        if (cmd == "set_text")
        {
            return(cmdSetTextBuf.run(words));
        }
        if (cmd == "speak")
        {
            return(cmdSpeak.run(words));
        }
        if (cmd == "speak_sync")
        {
            return(cmdSpeak.sync());
        }                                              // legacy v1.0.1 compat
        if (cmd == "sleep")
        {
            return(cmdSleep(words));
        }
        return(errUnsuppCmd());
    }