Schedule Record -- Help with script

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
zenk
Posts: 8
Joined: Thu Feb 12, 2015 11:35 am
Operating System: Please select

Schedule Record -- Help with script

Post by zenk » Fri Feb 13, 2015 3:56 pm

Hi, first...sorry for bad english rsrs

I search and found any topics about schedule recording, but i have others questions about it and other things to.
I have to record 24h one online radio.
I make a little script look:

Code: Select all

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_x64=getStJI.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
Local $iCount = 0
while $iCount<2
Run ("C:Program Files (x86)Audacityaudacity.exe")
WinWaitActive("Audacity")
Local $idInput_Date, $idInput_Time, $iMsgs
#forceref $idInput_Date, $idInput_Time
Send("r") ;Start
sleep (1800000) ;Record 30 minutes
Send("s") ;Stop
sleep (500)
send ("!+fee") ; Export to mp3
sleep (500)
send (@MDAY&"-"&@MON&" - CBN RIO - "&@HOUR&"-"&@MIN&@sec&".mp3 {enter} {enter}") ; Rename file with date, name and hour
;$icount+=1 ; Infinite loop 
But i have some problemas...
1 - When the file export, normally i have to wait a little time...2 minutes. and i can not lose the recording should continue.
I thought of open a new audacity and continue the recording. Like i show in code.
But, it's a not work. i do't know why :(
The script open a new audacity but no start record =/

2 - If you have any solution for first problem, i thought take number of first audacity process in windows, and put sleep (5 min) stop process...and continue just with second recording.

Well..i don't know if it are the best logical, if any one have any solution, i would like know rsrs

Thank You!

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Schedule Record -- Help with script

Post by kozikowski » Fri Feb 13, 2015 4:01 pm

Audacity is not a surveillance recorder. The only way I know of to get continuous recording and manage the sound files with Audacity is two computers. Also, there may be some issue with file length. WAV files rarely go longer than 4GB and in some conditions, 2GB. Exporting as MP3 has compression sound quality and length of processing issues.

Koz

zenk
Posts: 8
Joined: Thu Feb 12, 2015 11:35 am
Operating System: Please select

Re: Schedule Record -- Help with script

Post by zenk » Fri Feb 13, 2015 4:14 pm

kozikowski wrote:Audacity is not a surveillance recorder. The only way I know of to get continuous recording and manage the sound files with Audacity is two computers. Also, there may be some issue with file length. WAV files rarely go longer than 4GB and in some conditions, 2GB. Exporting as MP3 has compression sound quality and length of processing issues.

Koz
Hi Koz...Audacity was the only program that I found that allows me to record using the windows wasapi function. =/

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Schedule Record -- Help with script

Post by steve » Fri Feb 13, 2015 4:28 pm

This is not something that can be tackled with Nyquist, so I've moved it out of the Nyquist forum.
As you are using AutoIt, I assume that you are using some version of Windows, so I have moved this to the Windows forum board.

Please note that AutoIt is not our product and we are not able to provide technical support for products that we don't make.
Your question appears to be primarily about using AutoIt, so it would probably be better to ask their technical support for help with their product.

If you have questions relating to this that are directly about using Audacity, then we will be happy to try and help.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Schedule Record -- Help with script

Post by Gale Andrews » Fri Feb 13, 2015 4:39 pm

zenk wrote:When the file export, normally i have to wait a little time...2 minutes. and i can not lose the recording should continue.
I thought of open a new audacity and continue the recording.
That won't work whatever your script does, because current Audacity is designed not to open multiple instances of itself. All you will do if you call Audacity again is switch focus to the current Audacity instance.

The only way you can do it with one computer is to call the long obsolete 1.0.0 version of Audacity which will open then you can continue recording in that (after however long it takes you to start recording in that version). We don't (officially) support or encourage that so it's at your risk.

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

zenk
Posts: 8
Joined: Thu Feb 12, 2015 11:35 am
Operating System: Please select

Re: Schedule Record -- Help with script

Post by zenk » Fri Feb 13, 2015 4:51 pm

steve wrote:This is not something that can be tackled with Nyquist, so I've moved it out of the Nyquist forum.
As you are using AutoIt, I assume that you are using some version of Windows, so I have moved this to the Windows forum board.

Please note that AutoIt is not our product and we are not able to provide technical support for products that we don't make.
Your question appears to be primarily about using AutoIt, so it would probably be better to ask their technical support for help with their product.

If you have questions relating to this that are directly about using Audacity, then we will be happy to try and help.
Okay, sorry for the mistake
Gale Andrews wrote:
zenk wrote:When the file export, normally i have to wait a little time...2 minutes. and i can not lose the recording should continue.
I thought of open a new audacity and continue the recording.
That won't work whatever your script does, because current Audacity is designed not to open multiple instances of itself. All you will do if you call Audacity again is switch focus to the current Audacity instance.

The only way you can do it with one computer is to call the long obsolete 1.0.0 version of Audacity which will open then you can continue recording in that (after however long it takes you to start recording in that version). We don't (officially) support or encourage that so it's at your risk.

Gale
Ok Gale, i will try it. Thank you so much!

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Schedule Record -- Help with script

Post by steve » Fri Feb 13, 2015 5:06 pm

zenk wrote:Audacity was the only program that I found that allows me to record using the windows wasapi function.
I rarely use Windows, so I have a question:
Can WASAPI be set as the default for recording?
If it can, then I think that you could record using SoX http://sox.sourceforge.net/sox.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

zenk
Posts: 8
Joined: Thu Feb 12, 2015 11:35 am
Operating System: Please select

Re: Schedule Record -- Help with script

Post by zenk » Fri Feb 13, 2015 5:12 pm

steve wrote:
zenk wrote:Audacity was the only program that I found that allows me to record using the windows wasapi function.
I rarely use Windows, so I have a question:
Can WASAPI be set as the default for recording?
If it can, then I think that you could record using SoX http://sox.sourceforge.net/sox.html

Hi Steve, Thanks for support (:
yes, i cant set it in audacity.
i will see about SoX. Thank you so much!!!

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Schedule Record -- Help with script

Post by Gale Andrews » Sat Feb 14, 2015 2:36 pm

steve wrote:
zenk wrote:Audacity was the only program that I found that allows me to record using the windows wasapi function.
I rarely use Windows, so I have a question:
Can WASAPI be set as the default for recording?
If it can, then I think that you could record using SoX http://sox.sourceforge.net/sox.html
Unfortunately, no. SoX can only use whatever is the default recording device, and WASAPI loopback does not appear in the Windows "Sound" control panel so it can't be set as default. To use SoX you would have to have stereo mix or what U hear visible in Windows "Sound".

Can you find the address of the stream you want to record? You should then be able to use VLC to dump it to a file much as SoX would do.

Why in Audacity did you need the file before it was finished recording? Why not wait for the 24 hours then export the recording?

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

waxcylinder
Forum Staff
Posts: 14687
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Schedule Record -- Help with script

Post by waxcylinder » Sun Feb 15, 2015 12:05 pm

Gale Andrews wrote:
zenk wrote:When the file export, normally i have to wait a little time...2 minutes. and i can not lose the recording should continue.
I thought of open a new audacity and continue the recording.
That won't work whatever your script does, because current Audacity is designed not to open multiple instances of itself. All you will do if you call Audacity again is switch focus to the current Audacity instance.

The only way you can do it with one computer is to call the long obsolete 1.0.0 version of Audacity which will open then you can continue recording in that (after however long it takes you to start recording in that version). We don't (officially) support or encourage that so it's at your risk.
Actually I discovered recently when I was doing some QA testing for multi-project usage is that you appear to be able to have Audacity running on two separate users accounts at the same time both running independently of each other. I had one user recording WASAPI loopback to record what was playing on the computer and the other user was set to record form my FM radio via my external USB soundcard.

I was amazed by this and so was Leland Lucius, one of the key developers, when I discussed it with him.

Give I a try zenk/rsrs, and report back please.

WC
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Post Reply