Hello, I have a problem using the function which allows to launch a script in an award.ini
I explain what I did like this you can tell me where I made a mistake !!
I tested with 2 scripts: the first a bash and the second in python
I placed them in / profile / en / slot_programs
the bash script:
#!/usr/bin/env bash
pico2wave -l fr-FR -w /tmp/test.wav “$@”
aplay -q /tmp/test.wav
rm /tmp/test.wav
the python script:
#! / usr / bin / env python3
import os
import sysdef main():
phrase=("pico2wave -l fr-FR -w /tmp/test.wav ’ " + sys.argv[1] + “’”)
os.system(“rm /tmp/test.wav >nul 2>&1”)
fichier= os.system(phrase )
os.system(“aplay -q /tmp/test.wav”)-----------------------------------------------------------------------------
if name == “main”:
main()
both work perfectly in manual call
1- ./dit.sh 'Hello how are you "
2- python3 dit.py ‘Hello how are you’
But here begins my problems:
I tested various award options in Sentences such as:
[Testdit]
$dit moi bonjour
($dit) moi bonjour
Also I then added a SLOT:
“dit”: [
“(dit):dit”
]
when I test in get intention the log recognizes well:
[DEBUG: 70586664] InboxActor: -> stopped
[DEBUG: 70586660] HermesMqtt: Published intention to hermes / intention / dit
[DEBUG: 70586653] main: {“intention”: {“name”: “dit”, “confidence”: 1.0}, “entities”: [], “text”: “dit moi bonjour”, “raw_text”: " tell me hello “,” recognize_seconds “: 0.015486061998672085,” tokens “: [” says “,” me “,” hello “],” raw_tokens “: [” says “,” me “,” hello “],” speech_confidence " : 1, “slots”: {}, “wakeId”: “”, “siteId”: “default”, “time_sec”: 0.023162364959716797}
[DEBUG: 70586651] InboxActor: -> stopped
[INFO: 69838302] quart.serving: 192.168.0.31:61279 POST / api / text-to-intention 1.1 200 382 65558
[DEBUG: 69838290] InboxActor: -> stopped
but the script is never executed
I don’t see where my mistake is
Help