def get_audio_shape(params, fps, sr):
  """Calculate exact audio input shape given input parameters."""
  # check if it is video-text-only setting
  # pass [1, 1] to avoid unnecessary TPU occupation
  if params.split == "train":
    if params.name == "howto100m" and not params.use_howto100m_audio:
      return [1, 1]

  n_audio_secs = params.num_frames / fps
  n_waveform_samples = int(n_audio_secs * sr)
  if params.raw_audio:
    audio_shape = [n_waveform_samples, 1]
  else:
    n_stft_steps = int(params.stft_step * sr)
    n_stft_samples = int(n_waveform_samples / n_stft_steps)
    audio_shape = [n_stft_samples, params.mel_bins, 1]

  return audio_shape