View previous topic :: View next topic |
Author |
Message |
thp at westhawk.co.uk Guest
|
Posted: Thu May 08, 2008 5:31 am Post subject: [asterisk-users] SLN File Format |
|
|
On 8 May 2008, at 11:00, Adrian Marsh wrote:
Quote: | Hi All,
Whats the SLN file format (for import/export to Audacity)?
Need to avoid Sox if I can
|
16 bit signed audio at 8khz.
2 bytes per sample, no compression, 8000 samples per second, network
byte order, no header.
Tim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080508/2c02d6e9/attachment.htm |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Thu May 08, 2008 6:07 am Post subject: [asterisk-users] SLN File Format |
|
|
On Thu, May 08, 2008 at 11:00:18AM +0100, Adrian Marsh wrote:
Quote: | Hi All,
Whats the SLN file format (for import/export to Audacity)?
Need to avoid Sox if I can
|
export it as "wav". It's basically the same as "SLN", but with an extra
header that tells everyone what the exact format is. Thus Audacity will
not need you to enter parameters in the import dialog.
The only downside is that you can simply concatenate two files using
'cat file1 file2 >file1file2' with wav as you can with raw formats
(provided that both originals are of the same format), because the
header is not part of the stream.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
russell at digium.com Guest
|
Posted: Thu May 08, 2008 7:52 am Post subject: [asterisk-users] SLN File Format |
|
|
Tzafrir Cohen wrote:
Quote: | The only downside is that you can simply concatenate two files using
'cat file1 file2 >file1file2' with wav as you can with raw formats
(provided that both originals are of the same format), because the
header is not part of the stream.
|
Correction for the archives ... you can _not_ simply concatenate two [wav]
files.
--
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc. |
|
Back to top |
|
|
dbackeberg at gmail.com Guest
|
Posted: Thu May 08, 2008 8:23 am Post subject: [asterisk-users] SLN File Format |
|
|
Quote: | Tzafrir Cohen wrote:
Quote: | The only downside is that you can simply concatenate two files using
'cat file1 file2 >file1file2' with wav as you can with raw formats
(provided that both originals are of the same format), because the
header is not part of the stream.
|
Correction for the archives ... you can _not_ simply concatenate two [wav]
files.
|
Agreed. With wavs, you first have to convert to a raw format, then you
can concatenate, then you can convert back to wav.
$ for i in *.wav ; do echo $i; sox $i -r 8000 -c 1 -s -w $i-.raw; done
part1.wav
part2.wav
part3.wav
part4.wav
part5.wav
part6.wav
$ ls
part1.wav part2.wav part3.wav part4.wav
part5.wav part6.wav
part1.wav-.raw part2.wav-.raw part3.wav-.raw part4.wav-.raw
part5.wav-.raw part6.wav-.raw
$ cat part1.wav-.raw part2.wav-.raw part3.wav-.raw part4.wav-.raw
part5.wav-.raw part6.wav-.raw > whole_thing.wav-.raw
$ sox -r 8000 -c 1 -s -w whole_thing.wav-.raw whole_thing.wav
So much for "getting rid of sox". |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Thu May 08, 2008 8:39 am Post subject: [asterisk-users] SLN File Format |
|
|
On Thu, May 08, 2008 at 09:23:29AM -0400, David Backeberg wrote:
Quote: | Quote: | Tzafrir Cohen wrote:
Quote: | The only downside is that you can simply concatenate two files using
'cat file1 file2 >file1file2' with wav as you can with raw formats
(provided that both originals are of the same format), because the
header is not part of the stream.
|
Correction for the archives ... you can _not_ simply concatenate two [wav]
files.
|
Agreed. With wavs, you first have to convert to a raw format, then you
can concatenate, then you can convert back to wav.
$ for i in *.wav ; do echo $i; sox $i -r 8000 -c 1 -s -w $i-.raw; done
part1.wav
part2.wav
part3.wav
part4.wav
part5.wav
part6.wav
$ ls
part1.wav part2.wav part3.wav part4.wav
part5.wav part6.wav
part1.wav-.raw part2.wav-.raw part3.wav-.raw part4.wav-.raw
part5.wav-.raw part6.wav-.raw
$ cat part1.wav-.raw part2.wav-.raw part3.wav-.raw part4.wav-.raw
part5.wav-.raw part6.wav-.raw > whole_thing.wav-.raw
$ sox -r 8000 -c 1 -s -w whole_thing.wav-.raw whole_thing.wav
So much for "getting rid of sox".
|
Well, you could convert it with Asterisk (using e.g. "convert", and
batching of commands is nicer using the ast-cli script , though it
requires manager access setup).
But sox is nicer, indeed.
In later versions (at least in Debian) sox packages support for
different formats separately. Thus you don't have to carry with you
support for vorbis, mp3 and such just to process simple wav/riff files.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
philipp.kempgen at amo... Guest
|
Posted: Thu May 08, 2008 9:11 am Post subject: [asterisk-users] SLN File Format |
|
|
David Backeberg schrieb:
Quote: | Quote: | Tzafrir Cohen wrote:
Quote: | The only downside is that you can simply concatenate two files using
'cat file1 file2 >file1file2' with wav as you can with raw formats
(provided that both originals are of the same format), because the
header is not part of the stream.
|
Correction for the archives ... you can _not_ simply concatenate two [wav]
files.
|
Agreed. With wavs, you first have to convert to a raw format, then you
can concatenate, then you can convert back to wav.
|
Just out of curiosity:
I can't remember when I last had to concatenate 2 sound files.
So why does this always come up? IMHO it's one of those things
you hardly ever need.(?)
Gr??e,
Philipp Kempgen
--
Asterisk-Tag.org 2008, May 26th/27th -> http://www.asterisk-tag.org
amooma GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 |
|
Back to top |
|
|
russell at digium.com Guest
|
Posted: Thu May 08, 2008 9:36 am Post subject: [asterisk-users] SLN File Format |
|
|
Philipp Kempgen wrote:
Quote: | Just out of curiosity:
I can't remember when I last had to concatenate 2 sound files.
So why does this always come up? IMHO it's one of those things
you hardly ever need.(?)
|
I can't remember the last time I have done that.
Anytime I need to do something like that, I just use a nice tool like audacity ...
--
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc. |
|
Back to top |
|
|
dbackeberg at gmail.com Guest
|
Posted: Thu May 08, 2008 9:48 am Post subject: [asterisk-users] SLN File Format |
|
|
Quote: | Just out of curiosity:
I can't remember when I last had to concatenate 2 sound files.
So why does this always come up? IMHO it's one of those things
you hardly ever need.(?)
|
It's all about how you define "need". Obviously anybody can make
multiple script entries to play multiple files. My "taste" is that the
script is cleaner with an entry to play a single file that's heard as
a contiguous message by the enduser. This becomes a "need" in a
situation like mine, with a blend of asterisk and proprietary IVR,
messaging, etc. |
|
Back to top |
|
|
Adrian.Marsh at ubiqui... Guest
|
Posted: Thu May 08, 2008 10:28 am Post subject: [asterisk-users] SLN File Format |
|
|
My exact requirement.. to edit out some recorded hiss and then put the
file back...
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Russell
Bryant
Sent: 08 May 2008 15:37
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] SLN File Format
Philipp Kempgen wrote:
Quote: | Just out of curiosity:
I can't remember when I last had to concatenate 2 sound files.
So why does this always come up? IMHO it's one of those things
you hardly ever need.(?)
|
I can't remember the last time I have done that.
Anytime I need to do something like that, I just use a nice tool like
audacity ...
--
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
philipp.kempgen at amo... Guest
|
Posted: Thu May 08, 2008 10:33 am Post subject: [asterisk-users] SLN File Format |
|
|
Russell Bryant schrieb:
Quote: | Philipp Kempgen wrote:
Quote: | Just out of curiosity:
I can't remember when I last had to concatenate 2 sound files.
So why does this always come up? IMHO it's one of those things
you hardly ever need.(?)
|
I can't remember the last time I have done that.
Anytime I need to do something like that, I just use a nice tool like audacity ...
|
Yeah. But otoh I frequently do simple operations such as cross-fading
two mp3 files in my hex editor. Audacity would just be overkill.
Gr??e,
Philipp Kempgen
--
Asterisk-Tag.org 2008, 26.-27. Mai -> http://www.asterisk-tag.org
amooma GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 |
|
Back to top |
|
|
stotaro at totarotechn... Guest
|
Posted: Thu May 08, 2008 10:38 am Post subject: [asterisk-users] SLN File Format |
|
|
On Thu, May 8, 2008 at 7:07 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
Quote: | On Thu, May 08, 2008 at 11:00:18AM +0100, Adrian Marsh wrote:
Quote: | Hi All,
Whats the SLN file format (for import/export to Audacity)?
Need to avoid Sox if I can
|
export it as "wav". It's basically the same as "SLN", but with an extra
header that tells everyone what the exact format is. Thus Audacity will
not need you to enter parameters in the import dialog.
The only downside is that you can simply concatenate two files using
'cat file1 file2 >file1file2' with wav as you can with raw formats
(provided that both originals are of the same format), because the
header is not part of the stream.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
|
I was under the impression that ulaw/alaw was the closest to slin.
While it may not be practical for this usage, am I correct?
Thanks,
Steve T |
|
Back to top |
|
|
tzafrir.cohen at xorco... Guest
|
Posted: Thu May 08, 2008 10:41 am Post subject: [asterisk-users] SLN File Format |
|
|
On Thu, May 08, 2008 at 09:36:50AM -0500, Russell Bryant wrote:
Quote: | Philipp Kempgen wrote:
Quote: | Just out of curiosity:
I can't remember when I last had to concatenate 2 sound files.
So why does this always come up? IMHO it's one of those things
you hardly ever need.(?)
|
I can't remember the last time I have done that.
Anytime I need to do something like that, I just use a nice tool like audacity ...
|
Audacity automatically converts values to floats. Isn't there a
potential problem of loss of information?
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
|