def extract_channel(signal, channel_number):
    """Extract single channel from a multi-channel (stereo) audio signal"""
    try:
        return signal[:, channel_number]
    except IndexError:
        return signal