Scripting memory and MEDIA

HI, I tried to create a .scriptingmemory.txt with media value (instead of text). I tried both using “MEDIA $variable” and putting the MEDIA label inside the variable value in scriptingmemory.txt and then just referring to “$variable”. Both fail to expand - the string “$emailaudio” is interpreted as a media file name and Botium fails with ENOENT. Text values expand just fine with that setup, so it’s not like I forgot to enable scriptingmemory or tell botium-cli to expand it.

Tried this:

        |$emailaudio

Case1 |MEDIA df4fc63c-e032-48a5-ae57-933e4a300439-ut-8.wav
Case2 |MEDIA mpdatgmailcom.wav

and this:

        |$emailaudio

Case1 |df4fc63c-e032-48a5-ae57-933e4a300439-ut-8.wav
Case2 |mpdatgmailcom.wav

Nothing works.

        |$email

Case1 |email1@gmail.com
Case2 |email2@gmail.com

Works just fine, but I want to test with multiple audio utterances, not multiple strings.

Thanks,

Mike.

1 Like

hm, I think this is not possible right now. let me check. will come back when i know.

So, the scripting memory replaces a variable in the conversation flow, it cannot change the logic. But what actually should work is to use the scripting memory for the file names and use these filenames in the convo:

      |$emailaudio
Case1 |df4fc63c-e032-48a5-ae57-933e4a300439-ut-8.wav
Case2 |mpdatgmailcom.wav

In convo:

#me
MEDIA $emailaudio

#bot
...

Can you confirm that this does works (or does not work) in your case ?

1 Like

That doesn’t work. The $emailaudio variable doesn’t get expanded, and failure to find a file named “$emailaudio” results in ENOENT. That’s the second scenario I described in my original message.

Meanwhile, I discovered that if a MEDIA argument contains wildcards, those do get expanded, allowing tests with different media.

This should actually work, can you please attach a verbose log to further analyse this, thanks.

Wildcards can be used with the MEDIA input, it is described in the docs.

I’m sorry, my employer’s policy prohibits me from sharing the log in its entirety. I extracted what seemed relevant and packed it in “data.zip”, but your site’s policy seems to prohibit zip archives. Please let me know if you prefer me to e-mail the file to you.

Anyway, the most interesting lines seem to be :

botium-core-ScriptingProvider ExpandScriptingMemoryToConvos - Convo "new-self" - Scripting memory ["$emailaudio"] ignored because there is no common variable with convo [] +0ms

and

  botium-core-Convo BotiumError: new-self/Line 38: error sending to bot - downloadMedia failed: ENOENT: no such file or directory, open '/Users/mdimitroff/src/botium/email/$emailaudio'

thanks, that should do it. @ujja pls check