Order openhab by using wav or txt files

  • Platform information:
    • Hardware: RasPi3b+/32GB
    • Os : Linux 4.19.66-v7+
    • openHAB version: openHabain 2.5.4-1
  • I start with the demo, because it for a test

I would like to order my openhab with wav files or txt files.
I install Pico Text-to from the addons in Paper UI and by using this method https://www.openhab.org/addons/voice/picotts/#overview
But now I would like know where I should put my order files.
Anyone can help me please?

Welcome to the Community!

I would use standard install, even if just for a test as you may be limited with demo. :thinking:

I do not use Pico but this may help.

Hi H102, thank you for your answer, she helped me in my research. I finally found a solution by using txt file.

Rule “nom de la rule”
when
Time cron “* 0/5 * * * ?” (For this example I create a clock of 5 minutes)
Then
var String chemin = executeCommandLine(“cat /home/openhabian/MonFichier.txt”,1000)
logInfo(“nlu”,"contenue du fichier txt " +chemin)

if (chemin.contains(“allume la lumière”)){
hue1.send(ON)
}
end

Hello

I use voice control from Android App. Maybe you can use a similar approach:

rule "controlo por voz"

when

Item VoiceCommand received command

    then

    var String command = VoiceCommand.state.toString.toLowerCase

    sendNotification("xxxxxxx@gmail.com", "Recebi comando " + command)

    if (Mensagens.state==ON)

        

        {

            say(command , "voicerss:ptPT", "sonos:PLAY1:sala")


        

        }

    if (MenTVSala.state==ON)

        {

            LG_TV0_Toast.sendCommand(command)

        }

    if (command.contains("acende")||command.contains("acender")||command.contains("liga")||command.contains("ligar"))

            {

                if (command.contains("biblioteca"))

                {

                    LampadaTetoBiblio.sendCommand(ON)

                }

                else if (command.contains("quarto"))

                {

                    LampadaQPrincipal.sendCommand(ON)

                }

                else if (command.contains("laura"))

                {

                    LampadaLaura.sendCommand(ON)

                }

                else if (command.contains("sala"))

                {

                    LampadaTetoSalaTV.sendCommand(ON)

                }

                else if (command.contains("escada"))

                {

                    LampadaEscada.sendCommand(ON)

                }

                else if (command.contains("cozinha"))

                {

                    LampadaCozinha.sendCommand(ON)

                }

                else if (command.contains("entrada"))

                {

                    LampadaHallPatio.sendCommand(ON)

                }

                else if (command.contains("computador"))

                {

                    ValorLampBiblio.sendCommand("13")

                }

            }

    else if (command.contains("apaga")||command.contains("apagar")||command.contains("desliga")||command.contains("desligar"))

        {

            if (command.contains("biblioteca")||command.contains("computador"))

                    {

                        LampadaTetoBiblio.sendCommand(OFF)

                    }

                    else if (command.contains("quarto"))

                    {

                        LampadaQPrincipal.sendCommand(OFF)

                    }

                    else if (command.contains("laura"))

                    {

                        LampadaLaura.sendCommand(OFF)

                    }

                    else if (command.contains("sala"))

                    {

                        LampadaTetoSalaTV.sendCommand(OFF)

                    }

                    else if (command.contains("escada"))

                    {

                        LampadaEscada.sendCommand(OFF)

                    }

                    else if (command.contains("cozinha"))

                    {

                        LampadaCozinha.sendCommand(OFF)

                    }

                    else if (command.contains("entrada"))

                    {

                        LampadaHallPatio.sendCommand(OFF)

                    }

                    else if (command.contains("computador"))

                    {

                        ValorLampBiblio.sendCommand(OFF)

                    }

                    else if (command.contains("tudo"))

                    {

                        Lampadas.sendCommand(OFF)

                    }

                }

            else if (command.contains("abre")||command.contains("abrir"))

            {

            if (command.contains("quintal"))

            {

                PortaoPatioAbre.sendCommand(ON)

            }

            if (command.contains("tudo"))

            {

                AbreTudo.sendCommand(ON)

            }

            if (command.contains("biblioteca"))

            {

                ValorEstBiblio1.sendCommand("100")

                ValorEstBiblio2.sendCommand("100")

                ValorEstBiblio3.sendCommand("100")

            }

            if (command.contains("quarto"))

            {

                ValorEstQPrincipal.sendCommand("100")

            }

        }   

        else if (command.contains("fecha")||command.contains("fechar"))

        {

            if (command.contains("quintal"))

            {

                PortaoPatioFecha.sendCommand(ON)

            }

            if (command.contains("tudo"))

            {

                FechaTudo.sendCommand(ON)

            }

            if (command.contains("biblioteca"))

                {

                    ValorEstBiblio1.sendCommand("0")

                    ValorEstBiblio2.sendCommand("0")

                    ValorEstBiblio3.sendCommand("0")

                }

            if (command.contains("quarto"))

                {

                    ValorEstQPrincipal.sendCommand("0")

                }

        }

                        

end