hi all, I am trying to use the perl script in pipe_test.pl. Whenever I try to implement a command in a subroutine, I get an error message that the batch command isn’t recognized. so far, my code is just this:
startUp();
menuCommand("Play");
finish()
and this is the error message I get
[MenuCommand: CommandName=Play]
Your batch command of MenuCommand was not recognized.
BatchCommand Finished: Failed!
I also tried to use
getMenuCommands();
and I get the same error message. I have reviewed the commands in the documentation here (https://manual.audacityteam.org/man/scripting.html) and I can’t figure out why these simple commands don’t seem to work.
Also, I wonder if what I am trying to script in audacity is even possible with scripting. I’d like to use audacity’s noise reduction feature. Thank you!
No, unfortunately I am not familiar with Python
Is that scripting better supported? Perhaps I could learn. Also, is it even possible to automate the process I want (noise reduction)?
Hi! I can follow your instructions - thank you!! I have two further questions.
How do I give these commands input? So for example, if I want to automatically set the left boundary to 1min 25.670seconds, how could I use the “SetLeftSelection:” command?
I understand how to use the command line, but how do I put all these commands into a python script to be run automatically? I tried running mod-script-pipe but I get an error that says “FileNotFoundError: [Errno 2] No such file or directory: ‘\\.\pipe\ToSrvPipe’”
I figured some more things out. I can use the “SelectTime:” command to get what I want. Now my question is, when I use the “Get NoiseReduction…:” command, how do I access the dialog box to set the noise profile or (after I’ve selected all the audio) to click “ok” to get the noise reduction to run?
This is a trick one. If you’ve looked in the pipe_test.pl file, you may have noticed:
sub getEffects{
# (These ones will need special handling)
# AutoDuck
# Bass and Treble
# Repair
# NoiseRemoval
# ClickRemoval
# Paulstretch
I think you will need to look outside of Audacity’s commands and emit keystrokes directly from Python.
Here we get into murky platform specific issues because Windows, Mac and Linux have different ways of handling key events. Fortunately (I hope), there is a " cross-platform GUI automation Python module" called “PyAutoGUI”. I’ve not used this myself, but it looks like a good bet: PyAutoGUI · PyPI
Hi,
I tried to run the piped python script(pipe_test.py) on a windows10 machine with python 3.4.2 and mod-script enabled in audacity, but it is showing the following message “Your batch command of XXXX was not recognized”. Can anyone please help me with this?
Please start a new topic (this topic refers to an old version of Audacity and things have changed).
In your new topic, please describe step-by-step how to reproduce the problem, including the exact commands that you are attempting to send.
I’m locking this topic to avoid confusion with the current version of Audacity.