code: def audio_bytes_to_np(
      wav_data,
      sample_rate=DEFAULT_SAMPLE_RATE,
      normalize_db=0.1,
      mono=True,
  ):
      """Convert audio file data (in bytes) into a numpy array using Pydub.
  
      Args:
        wav_data: A byte stream of audio data.
        sample_rate: Resample recorded audio to this sample rate.
        normalize_db: Normalize the audio to this many decibels. Set to None to skip
          normalization step.
        mono: Force stereo signals to single channel. If false, output can one or
          two channels depending on the source signal.
  
      Returns:
        An array of the recorded audio at sample_rate, shape [channels, time].
      """
      return note_seq.audio_io.wav_data_to_samples_pydub(
          wav_data=wav_data,
          sample_rate=sample_rate,
          normalize_db=normalize_db,
          num_channels=1 if mono else None,
      )
  
file_path: ddsp/ddsp/colab/colab_utils.py
imports: import base64
  import io
  import pickle
  import ddsp
  import ddsp.training
  from google.colab import files
  from google.colab import output
  from IPython import display
  import note_seq
  import numpy
  from scipy.io import wavfile
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling a global function with example usage: audio_bytes_to_np(wav_data, sample_rate, normalize_db, mono) and returns: note_seq