Subject: Re: [linux-audio-user] AIFF files batch-slicing
From: Frank Barknecht (fbar_AT_footils.org)
Date: Sun Jul 04 2004 - 02:17:19 EEST
Hallo,
Christian Frisson hat gesagt: // Christian Frisson wrote:
> I need to automate a process for slicing audio files in AIFF format on multiple
> files everytime perfect silences are met (zero-amplitude). This should be
> multiplatform (Linux/Mac/Win) and minimal (no GUI, only command-lines: one
> should just have to launch the script / program).
...
> Any idea?
Puh, the cross-platform part is hard.
I'd suggest "pydoc wave" here, if you're into Python.
$ python
Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
[GCC 3.3.3 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wave
>>> file="/tmp/hmmbaby.wav"
>>> f = wave.open(file, 'r')
>>> f.getnchannels()
2
>>> f.getframerate()
44100
>>> f.readframes(2)
'\xdd\xe9\xe8\xe2$\xeb"\xe4'
>>> f.readframes(1)
'\x00\x00\x00\x00'
>>> f.close()
The last frame read was silence.
Ciao
-- Frank Barknecht _ ______footils.org__
This archive was generated by hypermail 2b28 : Sun Jul 04 2004 - 02:21:42 EEST