Page 1 of 1
Define custom file format
Posted: Thu Nov 18, 2010 5:59 pm
by adrianmarsh-ubi
Hi,
I want to open quite a few SLN files from Asterisk into Audacity.
Is there a way to associate .SLN files with the appropriate file format for Audacity to open the files with ?
Re: Define custom file format
Posted: Thu Nov 18, 2010 6:24 pm
by kozikowski
SLN is a Visual Studio file. You can install lame software and FFMpeg software and see if Audacity will recognize the format.
http://audacityteam.org/download/beta_windows
If not, then you'll need to convert the file to a WAV or other format that Audacity knows about.
Super and Switch (Google) are two format converter programs. You might be able to get Visual Studio itself to export WAV files.
Koz
Re: Define custom file format
Posted: Thu Nov 18, 2010 6:28 pm
by steve
You could export them from Asterisk as WAV files, then Audacity would be able to open them natively.
otherwise you will need to manually add arguments during Import into Audacity.
SLN files are 16 bit signed audio at 8khz.
2 bytes per sample, no compression, 8000 samples per second, network
byte order, no header.
http://lists.digium.com/pipermail/aster ... 11196.html
but because it is headerless Audacity can not automatically detect that.
An alternative approach would be to batch convert the files with SOX.
Re: Define custom file format
Posted: Sun Nov 21, 2010 11:37 am
by adrianmarsh-ubi
Thanks,
Koz - no these are Asterisk sound files, not Visual Studio.
Steve,
I was hoping to be able define a new type based on the .sln extension, so that Audacity automatically would imort them as 16 bit signed 8khz. Converting them is one option, but that just seems a bit weird seeing as Audacity *can* actually read the files, its just the defintion thats missing.
Re: Define custom file format
Posted: Sun Nov 21, 2010 11:48 am
by steve
adrianmarsh-ubi wrote: Converting them is one option, but that just seems a bit weird seeing as Audacity *can* actually read the files, its just the defintion thats missing.
But Audacity does not have any way of adding custom definitions for imported files.
I think that you would need to customise FFMpeg to be able to do that, but I don't know how you would do that and really that is outside of the scope of the support that we can offer on this forum. You may find some information about this on the FFmpeg website, or you could ask on one of their mailing lists:
http://www.ffmpeg.org/contact.html
If you manage to get this working I'd be interested to hear how you did it, and we do get a few Asterisk users come to this forum, so it would probably be interesting/useful for them if you posted your findings.