python-audio-effects
python-audio-effects copied to clipboard
Docstrings
It would be much easier to use this if each of the AudioEffectsChain
effect methods had docstrings. Right now it's necessary to dig through the source code to find which arguments to use.
I agree with @kingdom5500, I'd be ready to write docstrings on the effects I'll use.
I'd love to help, how does it work? I clone like I usually would, add docstrings. Then what? 🙈
@DannyDannyDanny, fork the project, make code changes and send a pull request! https://guides.github.com/introduction/flow/
@DannyDannyDanny , I can help with some of these too. If you want to assign a few to me I'll work on them.
I've started at the top of the list (equalizer) and am working down.
@carlthome , I'm making good progress on the doc strings, but I'm having trouble with bend. Can you give me a working example of how to use this function? It's not clear how to format the three numeric value that are part of each bend. Thanks!
And I have a similar question regarding chorus. These effects appear to require a single parameter (like "bends" and delays" that are made up of several numbers. I've tried quoting a group of values, and even tried making them a list as shown below, but so far nothing I've tried is working.
fx = (
AudioEffectsChain()
.chorus(0.7, 0.9, [55, 0.4, 0.25, 2])
)
I've added doc strings to most effects that lacked them and created a pull request. Cheers, Rudy
I've added doc strings to most effects that lacked them and created a pull request. Cheers, Rudy
Hi Rudy,
I needed to use this library for an academic project of mine but I was getting the error '.[WinError 2] The system can not find the file specified'. Can you please help me with this as you are working on it.
Thanks
i have been using this on Mac OS and have not seen this error. Sorry, not sure what to suggest.
Hi, Thank you for your response. I have tried using Mac and I was getting the same error. I am attaching the file, can you please check if possible
sorry, but i won’t be opening your unsolicited zip file. i note that you have no github history. maybe if you tell us more about your project, and your interest in python and sox?
Hi, I am sorry for sending the zip file.
I am working on an academic project to classify the heartsounds. I wanted to ignore the background noise and I found this package but was unable to use this because of the error. The zip files contained the error, an audio file and my python script.
Python_First:
import librosa from pysndfx import AudioEffectsChain import numpy as np import math import python_speech_features import scipy as sp import os from scipy import signal #assert os.path.isfile('C:/Users/HARISH/Downloads/Guru/train/a0001.wav') y, sr = librosa.load('Macintosh HD/Users/kabbie/Downloads/a0001.wav',sr = None) cent = librosa.feature.spectral_centroid(y=y, sr=sr) threshold_h = round(np.median(cent))*1.5 threshold_l = round(np.median(cent))*0.1 less_noise = (AudioEffectsChain().lowshelf(gain=-30.0, frequency=threshold_l, slope=0.8).highshelf(gain=-12.0, frequency=threshold_h, slope=0.5)) y_clean = less_noise('Macintosh HD/Users/kabbie/Downloads/a0001_sc.wav')
Python Secon:
import librosa from pysndfx import AudioEffectsChain import numpy as np import math import python_speech_features import scipy as sp import os import sox from scipy import signal #assert os.path.isfile('C:/Users/HARISH/Downloads/Guru/train/a0001.wav') y, sr = librosa.load('a0001.wav',sr = None) cent = librosa.feature.spectral_centroid(y=y, sr=sr) threshold_h = round(np.median(cent))*1.5 threshold_l = round(np.median(cent))*0.1 less_noise = (AudioEffectsChain().lowshelf(gain=-30.0, frequency=threshold_l, slope=0.8).highshelf(gain=-12.0, frequency=threshold_h, slope=0.5)) y_clean = less_noise(y)
From your screenshot:
sox could not be found!
Your issue does not appear to be related to python-audio-effects. SoX appears to be installed, but not in a directory that is in your PATH. This isn't an appropriate forum to try and debug this, I suggest https://github.com/mozilla/DeepSpeech/issues/1319 or https://github.com/Homebrew/legacy-homebrew/issues/35643 .
@rudytrubitt Cool beans! Can I still contribute? Or are you getting to a point where I'll be a nuissance more than help?
Hi @DannyDannyDanny , if you can document bend and chorus, that would be great. I was not able to create a working test example of those, it is not clear to me what syntax is required for all the settings for these effects.
Carl asked me to run docformatter to ensure a consistent formatting which I will get to shortly. If you could do the same with your additions, that would be great. https://pypi.org/project/docformatter/ https://github.com/myint/docformatter#wrapping-descriptions
You can see what I've created docstrings for up to now in my repo: https://github.com/rudytrubitt/python-audio-effects.git
Hello @carlthome,
I’ve run docformater on my changes and updated my repo at (https://github.com/rudytrubitt/python-audio-effects.git).
Initially I thought I’d create a new pull request, but now I’m thinking that’s not necessary. I do see there are changes to master so that a merge is necessary. Let me know if you need anything else.
Cheers rudy