from typing import BinaryIO
import wave


def wav_data_start(reader: BinaryIO) -> int:
  """Returns the byte position of the first audio sample in a WAVE file."""
  pos = reader.tell()
  reader.seek(0)
  with wave.open(reader, 'rb') as wav_reader:
    wav_reader.rewind()
    data_start = reader.tell()
  reader.seek(pos)
  return data_start