title: Pydub Slice Audio Segment By Sample
body: <p>Suppose I have two audio segments of the same sample rate that I have imported from .wav files in Pydub, and assume I know which is shorter.  Now suppose I want to split the longer audio file into two segments so that the first segment is the exact same length (down to the exact same number of samples!) as the shorter audio file and assign each of these two segments to new audio segments.  <strong>How can I do this in Pydub?</strong>  If I cannot get this level of precision using Pydub, can you give me an alternative that will work just as well?</p>
  
  <p>Basically I just want to split the longer audio segment into two at the sample-perfect level.  Here's an illustration of what I want:
  <a href="https://i.stack.imgur.com/P0b4J.png" rel="noreferrer"><img src="https://i.stack.imgur.com/P0b4J.png" alt="enter image description here"></a></p>