* how to concatenate 2 or more sound files?
@ Tyler Spivey
` Octavian Rasnita
` Charles Hallenbeck
0 siblings, 2 replies; 4+ messages in thread
From: Tyler Spivey @ UTC (permalink / raw)
To: speakup
how do i concatenate two or more sound files together into one sound file?
cat * >somefile.wav wouldn't work, because of the wave headers.
the files are all in the same format.
i found a way of doing it, but it is rather annoying.
here's my way, if anyone wants it.
head -c 40 something.wav >file.wav
this will get the wave header and put it in file.wav
wc -c something.wav
getst eh size
bc
size-40
gets the size, minus 40.
tail -c size something.wav >>file.wav
gets the wave data. size is the size you got with bc.
wc -c someother.wav
bc
size-40
same as above.
tail -c size someother.wav >>file.wav
same as above. you have file.wav
with the two files concatenated. now:
sox file.wav file2.wav
will convert it into a proper wave file.
i wouldn't recommend this, since it is slow, but it works when you need it,
if the files are the same format.
or at least it should...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to concatenate 2 or more sound files?
how to concatenate 2 or more sound files? Tyler Spivey
@ ` Octavian Rasnita
` Charles Hallenbeck
1 sibling, 0 replies; 4+ messages in thread
From: Octavian Rasnita @ UTC (permalink / raw)
To: speakup
If you have Windows also, you can type the following command:
type sound1.wav sound2.wav > sound3.wav
This will put the sound1.wav and sound2.wav in the file sound3.wav.
Windows will delete the headers that are not necessary and the file will
play.
You can do the same with mp3, etc.
Teddy,
orasnita@home.ro
----- Original Message -----
From: "Tyler Spivey" <tspivey8@telus.net>
To: <speakup@braille.uwo.ca>
Sent: Saturday, June 15, 2002 3:07 AM
Subject: how to concatenate 2 or more sound files?
> how do i concatenate two or more sound files together into one sound file?
> cat * >somefile.wav wouldn't work, because of the wave headers.
> the files are all in the same format.
> i found a way of doing it, but it is rather annoying.
> here's my way, if anyone wants it.
> head -c 40 something.wav >file.wav
> this will get the wave header and put it in file.wav
> wc -c something.wav
> getst eh size
> bc
> size-40
> gets the size, minus 40.
> tail -c size something.wav >>file.wav
> gets the wave data. size is the size you got with bc.
> wc -c someother.wav
> bc
> size-40
> same as above.
> tail -c size someother.wav >>file.wav
> same as above. you have file.wav
> with the two files concatenated. now:
> sox file.wav file2.wav
> will convert it into a proper wave file.
> i wouldn't recommend this, since it is slow, but it works when you need
it,
> if the files are the same format.
> or at least it should...
>
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to concatenate 2 or more sound files?
how to concatenate 2 or more sound files? Tyler Spivey
` Octavian Rasnita
@ ` Charles Hallenbeck
1 sibling, 0 replies; 4+ messages in thread
From: Charles Hallenbeck @ UTC (permalink / raw)
To: speakup
Tyler,
Use sox to convert each of the files to raw format, use cat to
concatenate them, then use sox to convert the resulting combined
raw file back to wav. For this last step you need to know the
parameters of the original wav files.
HTH - Chuck
--
Visit me at http://www.valstar.net/~hallenbeck
The Moon is Waxing Crescent (22% of Full)
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20020615000737.LULZ26462.priv-edtnes28.telusplanet.net@a7a 42593>]
end of thread, other threads:[~ UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
how to concatenate 2 or more sound files? Tyler Spivey
` Octavian Rasnita
` Charles Hallenbeck
[not found] <20020615000737.LULZ26462.priv-edtnes28.telusplanet.net@a7a 42593>
` Adam Myrow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).