1

I want to read a big audio file in Python. And segment it into many wave files and save them. I download a library call pyAudioAnalysis, and write code as follow:

from pyAudioAnalysis import audioBasicIO as aIO
from pyAudioAnalysis import audioSegmentation as aS
[Fs, x] = aIO.readAudioFile("/Users/name/Desktop/spto/CL124.wav")

However, this can't process file more than 1 GB. Is there any way to solve this problem? Thank you.

Anil_M
  • 10,893
  • 6
  • 47
  • 74
Pelican
  • 43
  • 7
  • While I can't find anything on processing audio file bigger than 1GB wouldn't cutting it on [multiples files](https://stackoverflow.com/questions/37999150/python-how-to-split-a-wav-file-into-multiple-wav-files) be a good solution? – Eric Godard Aug 02 '17 at 04:54
  • 1
    You might consider treating your audio input as a [stream](https://stackoverflow.com/questions/42625286/how-to-process-audio-stream-in-realtime) (instead of a file), and consider using a library like [librosa](https://github.com/librosa/librosa) to process it. – paulsm4 Aug 02 '17 at 04:57
  • @EricGodard Because I want to segment it into many sound files and delete those silence period. – Pelican Aug 02 '17 at 05:14
  • @Pelican Sorry, I'm not a pro in audio manipulation but wouldn't cutting the file (you can even use the solution on the link I sent) into multiple smaller wav file (that this time would be processable by your code) work? Then you can manage each of theses file, do the treatment to do what you wanted to (delete the silence period) and put it back in one file? – Eric Godard Aug 02 '17 at 05:42
  • @EricGodard Because if there is a sound between the cutting line, it will be seperated into two sound. – Pelican Aug 10 '17 at 23:10
  • @EricGodard : Check this SO posting for automatically splitting large files on silence and combining them. https://stackoverflow.com/questions/37725416/pydub-combine-split-on-silence-with-minimum-length-file-size – Anil_M Sep 01 '17 at 14:10
  • Possible duplicate of [Pydub - combine split\_on\_silence with minimum length / file size](https://stackoverflow.com/questions/37725416/pydub-combine-split-on-silence-with-minimum-length-file-size) – Anil_M Sep 01 '17 at 14:11

0 Answers0