scaper icon indicating copy to clipboard operation
scaper copied to clipboard

Unexpected warnings with dumping sources alongside mix

Open pseeth opened this issue 4 years ago • 9 comments

output_file: /tmp/tmprpqkwioa.wav already exists and will be overwritten on build
output_file: /tmp/tmpeup76dd4.wav already exists and will be overwritten on build

Also, I forgot to mention this one, which seems to happen in conjunction with one above:

Input formats were only specified for 0 out of 2 files.The last 2 files will remain unformatted.

Have to track these down - I believe they're coming from making the temporary files for the sources and then copying them somewhere. Maybe a collision?

pseeth avatar Feb 13 '20 03:02 pseeth

Yes, at first I thought it was from the seed being the same each run, but it remained after changing the seed.

epicycles avatar Feb 13 '20 05:02 epicycles

The temp file warnings are mentioned here: https://github.com/rabitt/pysox/issues/6 The input formats warning is mentioned here: https://github.com/rabitt/pysox/issues/85

epicycles avatar Feb 13 '20 21:02 epicycles

Yes, these are all sox warnings rather than scaper warnings. I forget whether it's possible to disable these, looks like it might not be supported yet based on the issues @epicycles has mentioned still being open.

We have 3 possible solutions:

  1. (short term): ignore the warnings and carry on
  2. (short term): make a PR to pysox to add the missing functionality
  3. (long term): replace pysox altogether with in-memory audio processing

In the long run I want to move toward 3. I'll see if I can manage 2 in the near future, but can't guarantee it. In the meanwhile, we're stuck with 1 :)

justinsalamon avatar Feb 15 '20 02:02 justinsalamon

Using disable_sox_warnings=True in scaper.generate() makes things look better.

epicycles avatar Feb 15 '20 03:02 epicycles

Should we change the default of disable_sox_warnings from False to True?

pseeth avatar Feb 19 '20 02:02 pseeth

Should we change the default of disable_sox_warnings from False to True?

OK, I think we can change it.

In this case we might want to add a line at the end of the docstring for disable_sox_warnings along the lines of "If you're experiencing issues related to audio I/O setting this parameter to True may help with debugging".

justinsalamon avatar Feb 19 '20 03:02 justinsalamon

Huh, so it actually is already True. My bad. The warnings only occur when their level is critical, apparently. So is it not working? Did John get a lucky run when the warnings went away? Confused.

pseeth avatar Feb 19 '20 03:02 pseeth

Just revisited the code :) Per the docstring:

disable_sox_warnings : bool When True (default), warnings from the pysox module are suppressed unless their level is 'CRITICAL'.

So, in principle, when disable_sox_warnings=True (default) you shouldn't see any sox warnings unless they're of the critical category. If it's set to False, you should see all sox warnings. Maybe @epicycles initially set it to False to be on the safe side and later changed it back to True? I don't know.

In any case, since sox will be completely replaced in the long run, I don't know that it makes sense to worry about this too much?

justinsalamon avatar Feb 19 '20 07:02 justinsalamon

Yeah, I don't think it's critical. I did add "If you're experiencing issues related to audio I/O setting this parameter to True may help with debugging" to the docstring in #55 since I was in the neighborhood, though!

pseeth avatar Feb 19 '20 07:02 pseeth