Re: Combining sound files
| From: | Colin Guthrie | Date: | Sun, 25 Feb 2007 23:23:05 +0000 |
| Subject: | Re: Combining sound files | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249415@lists.php.net to get a copy of this message | ||
tedd wrote:
>> If you are using linux I'd just shell out to sox or similar.
>
> I don't know how to do that.
http://uk.php.net/manual/en/ref.exec.php
sox is a command line program that you can experiment with on the
command line.
From it's man page:
NAME
SoX - Sound eXchange - The Swiss Army knife of audio manipulation
DESCRIPTION
SoX reads and writes audio files in most popular formats
and can
optionally apply effects to them; it can combine multiple
input
sources, synthesise audio, and, on many systems, act as a
general pur‐
pose audio player or a multi-track audio recorder.
The entire SoX functionality is available using just the ‘sox'
command,
however, to simplify playing and recording audio, if SoX is
invoked as
‘play', the output file is automatically set to be the default
sound
device and if invoked as ‘rec', the default sound device is used
as an
input source.
The heart of SoX is a library called ‘Sound Tools'. Those
interested
in extending SoX or using it in other programs should refer
to the
Sound Tools manual page: libst(3).
The overall SoX processing chain can be summarised as follows:
Input(s) → Balancing → Combiner → Effects → Output
> Any takers -- or suggestions how I can do this on a Mac?
You should be able to get sox on OSX. I'd imagine it's either easily to
install via a package or it's on fink. Either way you shouldn't have
much trouble.
This way you can just use the shell to do the work. You can do it in PHP
or in any other kind of script.
Hope this helps.
Col