🎤Actions

Config.Actions = {
    {
        phrases = {
            "recognition test",
            -- Make as much phrases for this action you want.
        },

        allowRecognitionInReverse = true,

        --[[ 
            Reverse Recognition is a setting that affects how phrases are recognized. If you turn on Reverse Recognition, saying any part of the phrase can trigger the action. 
            For instance, if the phrase is 'Buy some stuff', just saying 'stuff' is enough to trigger it.
            But if you turn off Reverse Recognition, you need to say the whole phrase exactly as it is, and in the right order. 
            In the previous example, you'd need to say 'Buy some stuff', not just 'stuff' or 'some stuff'.
        ]]-- 

        shouldBreak = true,
        
        --[[ 
           The "break" parameter in this context determines how the script behaves after finding an action that matches the spoken phrase. If "break" is set to true, the script will stop searching for additional matching actions and end the check loop once it finds a match. In contrast, if "break" is set to false, the script will continue scanning for more matching actions, even after finding the first match. It essentially controls whether the script should 'break' out of the loop after the first match or continue iterating through possible actions.
        ]]-- 

        blockInVehicle = true,

        actionType = "event",
        eventType = "client",
        eventName = "17mov_SpeechRecognition:TestPhrase",
        arguments = {
            arg1 = "17movement.net",
        },

        -- actionType = "executeCommand",
        -- commandString = "e flip",

        -- actionType = "custom",
        -- actionFunction = function(recognizedSentence)
        --     -- Add here ur custom code
        -- end,
    },
}

Last updated