Define custom file format

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
adrianmarsh-ubi
Posts: 2
Joined: Thu Nov 18, 2010 5:57 pm
Operating System: Please select

Define custom file format

Post by adrianmarsh-ubi » Thu Nov 18, 2010 5:59 pm

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 ?

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Define custom file format

Post by kozikowski » Thu Nov 18, 2010 6:24 pm

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

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Define custom file format

Post by steve » Thu Nov 18, 2010 6:28 pm

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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

adrianmarsh-ubi
Posts: 2
Joined: Thu Nov 18, 2010 5:57 pm
Operating System: Please select

Re: Define custom file format

Post by adrianmarsh-ubi » Sun Nov 21, 2010 11:37 am

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.

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Define custom file format

Post by steve » Sun Nov 21, 2010 11:48 am

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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked