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

For this stretch factor, the stretch effect has better performance. #157

Open
SeongYeonPark opened this issue Mar 22, 2023 · 1 comment
Open

Comments

@SeongYeonPark
Copy link

SeongYeonPark commented Mar 22, 2023

When running the below code,

from scipy.io.wavfile import read
import sox
import numpy as np

path = 'input.wav'
sr, wav = read(path)
tfm = sox.Transformer()
tfm.set_globals(verbosity=0)
stretch_ratio = np.random.normal(1.05,0.125)
tfm.tempo(stretch_ratio, audio_type='s')
wav = tfm.build_array(input_array=wav, sample_rate_in=sr)

I get a warning that says
'For this stretch factor, the stretch effect has better performance.'.

I want to turn this off, but it seems that
tfm.set_globals(verbosity=0)
does nothing.

What can I do to turn that warning off?

@SeongYeonPark
Copy link
Author

To add on, the above code sometimes does and sometimes doesn't give the warning, depending on the sampled stretch ratio.
However, I am not using that code itself, but rather using sox in a pytorch dataloader which loads audio and stretches it randomly.
As a result, the warning is pretty much spamming the terminal output.

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

1 participant