Author Topic: Save the audio file from VoxWav to a custom folder.  (Read 20653 times)

0 Members and 2 Guests are viewing this topic.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Save the audio file from VoxWav to a custom folder.
« Reply #30 on: August 01, 2013, 08:41:35 AM »
  But I am unable to get VoxCommando to process the wav once it's saved.

I don't know what you mean by that.  Process it how?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Save the audio file from VoxWav to a custom folder.
« Reply #31 on: August 01, 2013, 12:46:06 PM »
Okay the TcpMic plugin needs to transfer over a {LastResult} or other such variable when acting on the WavSaved event. 

Really?  Why?

I will determine what it NEEDS to do, but if you would like me to consider making yet another adjustment JUST FOR YOU then I think maybe you should try asking nicely.  Also I think you should try to explain a little better what you mean.  I think maybe you are just failing to grasp something about how the plugin works.

The WavSaved event carries payloads already with the full path to the file.  You should know this because you are using this to tell XBMC what file to play.  If that is not what you mean, then I have no idea what you are talking about.

Sorry about the negative tone, but you are starting to get to me.  I'm sure you don't intend to be rude, but I feel that you are being rude, despite the fact that I have been bending over backwards to accommodate you and all of your special needs.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #32 on: August 01, 2013, 01:34:01 PM »
I didn't mean NEEDS as in like it needs to be done LOL.  I was meaning I need to establish what the {payload} is.  I wasn't saying, get cracking and go write some code LOL...  Sorry James.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #33 on: August 01, 2013, 01:40:33 PM »
Well got everything up and running anyway, and yes I was completely daft about the {LastResult} thing and am sorry about that.  I learn't a lot today though about scripting batch files though, most likely an unnecessary learning curve but hey.  Ooops! 

Can't stress enough how much I do appreciate your assistance, if I'm asking too many questions, you don't need to respond, I'm just like a kid in a candy store at the moment.  Also it could be blunt kiwi culture that your mistaking for bossyness LOL..   My bad! :)

Will post a video to you all tomorrow to show yah what I've been done, I think I'm going to take a leaf out of your book and do some video blogging to demonstrate any future queries. 

Thanks again....

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Save the audio file from VoxWav to a custom folder.
« Reply #34 on: August 01, 2013, 01:48:21 PM »
OK sorry if I overreacted, and thanks for the apology / clarification.

I do appreciate your enthusiasm, but maybe take a little more time to compose your posts to make yourself a bit more clearly understood.  You seem to have a tendency to go a bit "stream of consciousness" which can exhaust me mentally, and make me crabby.  I'm already suffering a bit from information overload. It'll make my life easier and I'll be able to help you more efficiently, if your questions are a bit more well thought out.  I understand that you are trying to do a lot of stuff quickly, but sometimes rushing takes longer... and it is not just your time that gets wasted.
« Last Edit: August 02, 2013, 11:34:05 AM by jitterjames »

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #35 on: August 02, 2013, 12:03:16 AM »
I agree. I'm a little embarrassed to be honest.  I'm quite aware of this tenancy, I'm essentially thinking out loud, I compose emails for my self in a lot of ways, externalising my thought process.  Haha gosh I gotta work on this..  Thanks James. 

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #36 on: August 04, 2013, 01:53:36 AM »
Hey James, just before I say anything, this is not an immediate 'get to it'. Just covering my bases. :D

Um I'm having a lot of fun with the recording functionality.  What I'm experimenting with now is pretty cool.  Was going to ask though, how much difficulty would it be to remove the date saving functionality to the file-name.  As this is easily done through the use of the {Long Time} variables. 

What I'm doing is when you hear a 'ShoutOut' (a recorded wave), I'm adding the functionality of simply being able to say 'Reply' and and then by clever filename association is able to determine a 'replied' ShoutOut to the original and then play it back-to-back. Only problem is iis that attached date is throwing off my method.

I have assigned the variable {ShoutFile} to keep hold of the last played ShoutOut. Then when I activeate the reply command it simply grabs the {ShoutFile} variable and assigns an additional variable to the end. {ShoutFile}(1).  I can then have replies palyed back alongside with the original file. 

At the moment I can only work out how to do one additional reply as I don't know how to make it tick up a number each time, but I hope you get the general gist. 

I'm just playing around, just curious as to some insight.  Once again not in any way a biggie. 

Thanks :)





jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Save the audio file from VoxWav to a custom folder.
« Reply #37 on: August 04, 2013, 09:50:24 AM »
Sure.  I think I can just remove the date from the filename since you are probably the only person using this action.  Keep in mind that by using {longtime} you are getting the time that the action is called, not the time when the file is created.  But it should not matter for you, I think.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #38 on: August 04, 2013, 07:49:16 PM »
Thanks James.  How would I go about extrapolating only the file-name from the {1} variable when the SaveWav action takes place.  I'm basically wanting to use the timestamp as purely a means of identification.  So as to when someone replies to a ShoutOut I can carry the timestamp as a variable but can alter the name. So you have

ShoutOut2013_8_2_23_18.wav where I only carry the 2013_8_2_23_18 so I can then append something like Reply12013_8_2_23_18.wav

I see that things like {item.artist[[ & ]]} removes the & I'm presuming, so I'm right to believe where I have the {1} variable carrying Z:\Library\ShoutOut\ShoutOut2013_8_2_23_18.wav I would then go:

{[[Z:\Library\ShoutOut\ShoutOut]]1[[.wav]]}

Am I close LOL?  Thanks again...  I"m clearly one of special needs LOL

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Save the audio file from VoxWav to a custom folder.
« Reply #39 on: August 05, 2013, 11:17:59 AM »
How would I go about extrapolating only the file-name from the {1} variable when the SaveWav action takes place.

I think you are talking about the payload that is attached to the event that is fired when the wav is actually saved, not the "the {1} variable when the SaveWav action takes place" because I don't know what that means.

You want to extrapolate only the filename, but in fact ShoutOut2013_8_2_23_18.wav is the filename.  What you really want to do is to remove the date I guess.  You can do this using regex.

ShoutOut2013_8_2_23_18.wav where I only carry the 2013_8_2_23_18 so I can then append something like Reply12013_8_2_23_18.wav
I'm not familiar with the expression "where I only carry the", and I'm not sure what format of filename you ultimately want to end up with.  Anyway.  Why don't you just add reply1 to the end of the filename?  Why does it need to be in front of the date?

I see that things like {item.artist[[ & ]]} removes the & I'm presuming, so I'm right to believe where I have the {1} variable carrying Z:\Library\ShoutOut\ShoutOut2013_8_2_23_18.wav I would then go:
{[[Z:\Library\ShoutOut\ShoutOut]]1[[.wav]]}

Am I close LOL?  Thanks again...  I"m clearly one of special needs LOL

Not even close.  :biglaugh  That format only relates to the xJson.Parsetokens action, which is used to parse the json result returned by XBMC.  This does not relate to what you are doing here at all.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #40 on: August 05, 2013, 10:13:09 PM »
Quote
I think you are talking about the payload that is attached to the event that is fired when the wav is actually saved, not the "the {1} variable when the SaveWav action takes place" because I don't know what that means.

You want to extrapolate only the filename, but in fact ShoutOut2013_8_2_23_18.wav is the filename.  What you really want to do is to remove the date I guess.  You can do this using regex.

I understand that "ShoutOut2013_8_2_23.18.wav" is the filename, but the variable {1} returns the full path and extension as well, so I'm left with something that looks this "Z:/Library/Shoutouts/ShoutOut2013_8_2_23.18.wav"  What I am wanting to work out how to do is extrapolate just the file-name, specifically the date saved to that file-name.

The payload {1} returns the fullpath/filename/extention.  I don't know how to be any clearer. Sorry.

Quote
I'm not familiar with the expression "where I only carry the", and I'm not sure what format of filename you ultimately want to end up with.  Anyway.  Why don't you just add reply1 to the end of the filename?  Why does it need to be in front of the date?

It could be at the end, trust me I tried that first, but I can't work out how to remove the ".wav" so I get "ShoutOUt2013_8_2_23.18.wav.reply1.wav" and this causes havoc on the playback of the wave file for reasons unknown. 

The expression "where I only carry the"? Okay, where I only keep the, where I only retain the, where I only hold on to the.  :D

Quote
Not even close. That format only relates to the xJson.Parsetokens action, which is used to parse the json result returned by XBMC.  This does not relate to what you are doing here at all.

Well I'm trying to understand :bonk !!! I'll look into regex.  hopefully there's some documentation regarding it.  I have no issue with reading on documentation when trying to understand all this if you could be so kind as to point me in the right direction. 

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Save the audio file from VoxWav to a custom folder.
« Reply #41 on: August 05, 2013, 10:33:07 PM »
It might help me if I could see the relevant commands that you have so far.  I'm having a bit of trouble wrapping my head around the replies.

Regex is used quite often.  If you poke around the forum you'll see us using it for lots of things.  I usually recommend the c# regex cheat sheet

http://www.mikesdotnetting.com/Article/46/CSharp-Regular-Expressions-Cheat-Sheet.

You will probably need some help to get started with the VC action so if you give me your code I can try to show you how to extract just the date or something.

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #42 on: August 06, 2013, 12:28:11 AM »
Not really much to show as I can't do any thing until I find a way to extrapolate just the "filename" and not the full path. 

But I will show you what I've got..


This is for the recording of ShoutOuts and Reply's and dealing with the processing of the wavs after being recorded (cleanup)
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Shoutout" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="979" name="ShoutOut" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TcpMic.SaveNext</cmdType>
      <cmdString>Z:\Library\Shoutouts\Processing\shoutouts</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SetVoiceName</cmdType>
      <cmdString>IVONA Amy</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <cmdString>300</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SoftMute</cmdType>
      <cmdString>80</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <cmdString>{M:TTS.Go for it}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SoftUnMute</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Shout Out</phrase>
  </command>
  <command id="994" name="Reply" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TcpMic.SaveNext</cmdType>
      <cmdString>Z:\Library\Shoutouts\Processing\R1{var.ShoutFile}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SetVoiceName</cmdType>
      <cmdString>IVONA Amy</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>VC.Pause</cmdType>
      <cmdString>300</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SoftMute</cmdType>
      <cmdString>80</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <cmdString>{M:TTS.Go for it}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SoftUnMute</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Reply</phrase>
  </command>
  <command id="647" name="Process ShoutOut" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Results.SetVar</cmdType>
      <cmdString>ShoutFile&amp;&amp;{1}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Launch.RawParam</cmdType>
      <cmdString>"C:\Program Files (x86)\sox-14-4-1\sox.exe"&amp;&amp;"C:\Program Files (x86)\sox-14-4-1C:\sox.exe" "z:\library\shoutouts\processing\{var.ShoutFile}" "z:\library\shoutouts\{var.ShoutFile}" gain -n -3 silence 1 0.1 0.8% -1 0.5 0.8% contrast 50</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>TcpMic.WavSaved</event>
  </command>
</commandGroup>


This is the track announcing section.  You only need to focus on the ShoutOut action to see what I'm doing. 
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<commandGroup open="True" name="Announcer" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="571" name="Ducker" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.SoftMute</cmdType>
      <cmdString>90</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>XBMC.Player.OnPlay.song</event>
  </command>
  <command id="552" name="ShoutOuts" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <cmdString>Z:\Library\Stings\ShoutOut - Snap In.wav&amp;&amp;True</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>File.GetRandFile</cmdType>
      <cmdString>Z:\Library\ShoutOuts\&amp;&amp;shoutout*.wav</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <cmdString>ShoutFile</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <cmdString>{var.ShoutFile}&amp;&amp;True</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <cmdString>Z:\Library\Stings\ShoutOut - Snap In.wav&amp;&amp;True</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <cmdString>R1{var.ShoutFile}&amp;&amp;True</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <cmdString>R2{var.ShoutFile}&amp;&amp;True</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <cmdString>R3{var.ShoutFile}&amp;&amp;True</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Sound.PlayWav</cmdType>
      <cmdString>Z:\Library\Stings\ShoutOut - Snap Out.wav&amp;&amp;True</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>XBMC.Player.OnPlay.song</event>
  </command>
  <command id="553" name="TTS Announce" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <cmdString>Player.GetItem&amp;&amp;"playerid":0, "properties": ["title", "album", "artist","genre"]</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.ParseTokens</cmdType>
      <cmdString>{item.genre}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{LastResult}&amp;&amp;Podcast</ifParams>
      <then />
      <else>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>Z:\Library\Stings\TTS fade in.wav</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SetVoiceName</cmdType>
          <cmdString>IVONA Amy</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.ParseTokens</cmdType>
          <cmdString>Now playing. {item.title}. |Now for. {item.title}.  |Lets enjoy. {item.title}.  |Now for some. {item.title}.  |Time to enjoy. {item.title}. </cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.Pause</cmdType>
          <cmdString>300</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <cmdString>{LastResult}</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SetVoiceName</cmdType>
          <cmdString>IVONA Brian</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.ParseTokens</cmdType>
          <cmdString>From the band. {item.artist[[ &amp; ]]}|From the artist. {item.artist[[ &amp; ]]}|The group. {item.artist[[ &amp; ]]}|{item.artist[[ &amp; ]]}</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <cmdString>{LastResult}</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>Z:\Library\Stings\TTS fade out.wav</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>VC.Pause</cmdType>
          <cmdString>300</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <event>XBMC.Player.OnPlay.song</event>
  </command>
  <command id="589" name="Sting - Podcast" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <cmdString>Player.GetItem&amp;&amp;"playerid":0, "properties": ["title", "album", "artist","genre"]</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.ParseTokens</cmdType>
      <cmdString>{item.genre}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{LastResult}&amp;&amp;Podcast</ifParams>
      <then>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>Z:\Library\Stings\Sting - Snap In.wav&amp;&amp;True</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.ParseTokens</cmdType>
          <cmdString>{item.artist[[, also, ]]}</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>File.GetRandFile</cmdType>
          <cmdString>Z:\Library\Stings\&amp;&amp;{LastResult}*.wav</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>{LastResult}&amp;&amp;True</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>Z:\Library\Stings\Sting - Snap Out.wav&amp;&amp;True</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.Raw</cmdType>
          <cmdString>Input.ExecuteAction&amp;&amp;"action":"skipprevious"</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <event>XBMC.Player.OnPlay.song</event>
  </command>
  <command id="592" name="Sting - Music" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <cmdString>Player.GetItem&amp;&amp;"playerid":0, "properties": ["title", "album", "artist","genre"]</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.ParseTokens</cmdType>
      <cmdString>{item.genre}</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="True">
      <ifType>(A)Contains(B)</ifType>
      <ifParams>{LastResult}&amp;&amp;Podcast</ifParams>
      <then>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>Z:\Library\Stings\Sting - Snap In.wav&amp;&amp;True</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.ParseTokens</cmdType>
          <cmdString>{item.artist[[, also, ]]}</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>File.GetRandFile</cmdType>
          <cmdString>Z:\Library\Stings\&amp;&amp;{LastResult}*.wav</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>{LastResult}&amp;&amp;True</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Sound.PlayWav</cmdType>
          <cmdString>Z:\Library\Stings\Sting - Snap Out.wav&amp;&amp;True</cmdString>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else />
    </if>
    <event>XBMC.Player.OnPlay.song</event>
  </command>
  <command id="549" name="Ducker" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>XJson.Raw</cmdType>
      <cmdString>Input.ExecuteAction&amp;&amp;"action":"skipprevious"</cmdString>
      <cmdRepeat>0</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SoftUnMute</cmdType>
      <cmdString />
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>XJson.SetVol</cmdType>
      <cmdString>100</cmdString>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <event>XBMC.Player.OnPlay.song</event>
  </command>
</commandGroup>

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #43 on: August 06, 2013, 01:44:23 AM »
Quote
I understand that "ShoutOut2013_8_2_23.18.wav" is the filename, but the variable {1} returns the full path and extension as well, so I'm left with something that looks this "Z:/Library/Shoutouts/ShoutOut2013_8_2_23.18.wav"  What I am wanting to work out how to do is extrapolate just the file-name, specifically the date saved to that file-name.

Take a look here, this might be helpful - with the action "Results.Replace/Results.RegExReplace" it is possible to clear up your LastResult.

http://voxcommando.com/mediawiki/index.php?title=Actions#RegExReplace
***********  get excited and make things  **********

thesystemera

  • $upporter
  • Sr. Member
  • *****
  • Posts: 125
  • Karma: 0
    • View Profile
Re: Save the audio file from VoxWav to a custom folder.
« Reply #44 on: August 06, 2013, 02:09:22 AM »
Quote
Take a look here, this might be helpful - with the action "Results.Replace/Results.RegExReplace" it is possible to clear up your LastResult.

http://voxcommando.com/mediawiki/index.php?title=Actions#RegExReplace

Thanks, that's exactly what I'm after.  I don't know how I missed that!