def extract_encoding_and_rate_from_wav_header(wav_header):
    """
    Attempt to extract encoding, sample rate from possible WAV header.

    Args:
        wav_header (bytes):
            Possible WAV file header.

    Returns:
        Union[bool, str]:
            False or truthy value, which may be the encoding name.
        int:
            Sample rate if WAV header successfully parsed, else 0.
    """
    if wav_header[:4] == b'RIFF' and wav_header[8:12] == b'WAVE':
        # Get the encoding type, which is always truthy.
        encoding_bytes = wav_header[20:22]
        if encoding_bytes == b'\x01\x00':
            wav_encoding = 'pcm_s16le'
        elif encoding_bytes == b'\x06\x00':
            wav_encoding = 'a-law'
        elif encoding_bytes == b'\x07\x00':
            wav_encoding = 'mu-law'
        else:
            wav_encoding = True
        # Get the sample rate.
        sample_rate = int.from_bytes(wav_header[24:28], byteorder='little')
        return wav_encoding, sample_rate
    else:
        return False, 0