def audio_summary(tag, audio, sample_rate=<NUM_LIT>):
audio = audio.squeeze()<EOL>if audio.ndim != <NUM_LIT:1>:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'.format(audio.shape))<EOL><DEDENT>audio = _make_numpy_array(audio)<EOL>tensor_list = [int(<NUM_LIT> * x) for x in audio]<EOL>fio = io.BytesIO()<EOL>wave_writer = wave.open(fio, '<STR_LIT:wb>')<EOL>wave_writer.setnchannels(<NUM_LIT:1>)<EOL>wave_writer.setsampwidth(<NUM_LIT:2>)<EOL>wave_writer.setframerate(sample_rate)<EOL>tensor_enc = b'<STR_LIT>'<EOL>for v in tensor_list:  <EOL><INDENT>tensor_enc += struct.pack('<STR_LIT>', v)<EOL><DEDENT>wave_writer.writeframes(tensor_enc)<EOL>wave_writer.close()<EOL>audio_string = fio.getvalue()<EOL>fio.close()<EOL>audio = Summary.Audio(sample_rate=sample_rate,<EOL>num_channels=<NUM_LIT:1>,<EOL>length_frames=len(tensor_list),<EOL>encoded_audio_string=audio_string,<EOL>content_type='<STR_LIT>')<EOL>return Summary(value=[Summary.Value(tag=tag, audio=audio)])<EOL>
Outputs a `Summary` protocol buffer with audio data.

    Parameters
    ----------
        tag : str
            A name for the generated summary. Will also serve as a series name in TensorBoard.
        audio : MXNet `NDArray` or `numpy.ndarray`
            Audio data that can be squeezed into 1D array. The values are in the range [-1, 1].
        sample_rate : int
            Sampling frequency. 44,100Hz is a common sampling frequency.

    Returns
    -------
        A `Summary` protobuf of the audio data.