recipes.cad1.task2.baseline.enhance module¶
Run the dummy enhancement.
- recipes.cad1.task2.baseline.enhance.compute_average_hearing_loss(listener: Listener) float [source]¶
Compute the average hearing loss of a listener.
- Parameters:
listener (Listener) – The listener.
- Returns:
The average hearing loss of the listener.
- Return type:
average_hearing_loss (float)
- recipes.cad1.task2.baseline.enhance.enhance(config: DictConfig) None [source]¶
Run the music enhancement. The baseline system is a dummy processor that returns the input signal.
- Parameters:
config (dict) – Dictionary of configuration options for enhancing music.
- recipes.cad1.task2.baseline.enhance.enhance_song(waveform: ndarray, listener: Listener, config: DictConfig) tuple[ndarray, ndarray] [source]¶
Enhance a single song for a listener.
Baseline enhancement returns the signal with a loudness of -14 LUFS if the average hearing loss is below 50 dB HL, and -11 LUFS otherwise.
- Parameters:
waveform (np.ndarray) – The waveform of the song.
listener (Listener) – The listener.
config (dict) – Dictionary of configuration options for enhancing music.
- Returns:
The enhanced left channel. out_right (np.ndarray): The enhanced right channel.
- Return type:
out_left (np.ndarray)