Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I run it with python script ? #7

Open
RoiBites1515 opened this issue Feb 3, 2021 · 1 comment
Open

How can I run it with python script ? #7

RoiBites1515 opened this issue Feb 3, 2021 · 1 comment

Comments

@RoiBites1515
Copy link

I would love to know how can I run it with python script,
Thanks.

@markelwin
Copy link

@RoiBites1515 and those who enter via search engine.

The script worked wonderfully for me. As of the time of this posting the read statements within the script require three user inputs and each specify defaults. Because these specify defaults they can be bypassed on the command line, which answers the original question. For simplicity and clarification the parameters and defaults at the times this post are:

Sample noise start time [00:00:00]: 
Sample noise end time [00:00:00.500]: 
Noise reduction amount [0.21]: 

read can always be bypassed by piping in through an echo statement such as described here.

echo | ./noiseclean.sh input.wav output.wav will bypass the read statements and use their defaults.

To use through Python simply requires the subprocess module:

import subprocess
cmd = "echo | ./noiseclean.sh input.wav output.wav"
subprocess.run(cmd.split())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants