I would suggest using MoviePy and a variation of this 30 lines of code which does the reverse for video files, (detecting high levels of sound to extract and splice video files to get the highlights of football/soccer matches).
The changes necessary would be to:
- use
AudioFileClip
rather than VideoFileClip
.
- Look for pauses, (lows), rather than peaks in the sound levels.
- Split from the end of the pause to the start of the next rather than from just before the start to just after the end of the high.
- Save each split to a different filename rather than concatenating.
- Add a threshold for the lengths of the pauses.
This solution uses:
- Python Needs to be installed first
- MoviePy - Installed with pip install MoviePy this also installs the following python libraries, if missing:
- Numpy - Windows users may need to manually download and installed from here.
- decorator
- imageio
- Pillow
- olefile (Windows only requirement for Pillow)
- tqdm
- FFMPEG - Automatically installed by MoviePy on first run if not found.
All of the items mentioned above are:
- Free, Gratis & Open Source
- Cross Platform (with the exception of
olefile
which is not required on non-Windows machines)
- Permissively licenced.
- Compact (the downloads for the above, in order & on my machine, are 30 MB, 18 MB (including dependencies) & 48 MB)
To actually detect sentence ending rather than pauses would require a much more complex approach involving speech to text conversion, natural language parsing, etc. but if you were using video with subtitles as an input you could simply detect the full stops in the subtitle file to get the timestamps and extract the audio between those timestamps.