title: How to fix this Value Error | ValueError: could not broadcast input array from shape (2048,2050) into shape (2048) | line 10 and 16
body: <pre><code>def frame_audio(audio, FFT_size=2048, hop_size=10, sample_rate=44100):
  # hop_size in ms
  
  audio = np.pad(audio, int(FFT_size / 2), mode='reflect')
  frame_len = np.round(sample_rate * hop_size / 1000).astype(int)
  frame_num = int((len(audio) - FFT_size) / frame_len) + 1
  frames = np.zeros((frame_num,FFT_size))
  
  for n in range(frame_num):
      frames[n] = audio[n*frame_len:n*frame_len+FFT_size]
  
  return frames
  </code></pre>
  <p>hop_size = 15 #ms
  FFT_size = 2048</p>
  <p>audio_framed = frame_audio(audio, FFT_size=FFT_size, hop_size=hop_size, sample_rate=sample_rate)
  print(&quot;Framed audio shape: {0}&quot;.format(audio_framed.shape))</p>