Open achabotl opened 9 years ago
In speech.Exeriment.adjust_levels, it should be possible to adjust the levels correctly even if the signals are binaural. A way to do this is simply:
speech.Exeriment.adjust_levels
average_level = np.mean(utils.dbspl(signal))
Average level should therefore always be a single number, independently of if signal has one, two, or more channels.
signal
Something like this should do the trick:
mean_level = np.mean(utils.dbspl(signal)) adjusted_signal = target * 10 ** ((target_level - mean_level) / 20)
In
speech.Exeriment.adjust_levels
, it should be possible to adjust the levels correctly even if the signals are binaural. A way to do this is simply:Average level should therefore always be a single number, independently of if
signal
has one, two, or more channels.