Author Topic: Setting filename using variable  (Read 264 times)

IvanS

  • Newbie
  • *
  • Posts: 13
Setting filename using variable
« on: February 15, 2025, 08:20:53 AM »
Hi,
I have set a text variable to the timestamp (YYYYMMDDHHMMSSmmm i.e. 20250215155734170) with this command:

Set text [SPEAKTIME] to '{TIMESTAMP}'
Append, '_SPOKEN_{TXT:SPEAKTIME}_{CMD}{NEWLINE}' to file 'unrecognized.txt'
Save unrecognized audio

In 'Save unrecognized audio' I insert as filename: '{TXT:SPEAKTIME}.wav'
but VA complains 'The file name is not valid'
In the unrecognized.txt the timestamp with the unrecognized text appears as expected.

What am I doing wrong ?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4836
  • RTFM
Re: Setting filename using variable
« Reply #1 on: February 15, 2025, 08:28:54 AM »
That should result in a valid file name, from what you're describing.

Can you export the command and attach the .vap to a post here?

IvanS

  • Newbie
  • *
  • Posts: 13
Re: Setting filename using variable
« Reply #2 on: February 15, 2025, 08:51:53 AM »
Thanks for the prompt reply. 

However I got it working, so the problem is solved.  This was the issue: I put the filename {TXT:SPEAKTIME}.wav in the text box of the file browser, but since that file doesn't exist in the shown directory, it says 'file name invalid'.  If I just put it in the text box under 'Save the captured audio' checkbox it works.