Converting Audio Files with SoX

85 views
Skip to first unread message

Shada Bahassan

unread,
Nov 3, 2021, 9:01:36 AM11/3/21
to Django users

I'm trying to get a walk to convert a bunch of audio files from .ul file to .wav file but I can't seem to get my head around how to call SoX (http://sox.sourceforge.net/) in CMD and Django.


Kasper Laudrup

unread,
Nov 3, 2021, 9:13:08 AM11/3/21
to django...@googlegroups.com
Where does Django enter the picture?

Do you want to call an external process from Django? Then just use the
Python standard library (eg. the subprocess module).

It's hard to help you unless you try to clarify a bit or describe
exactly what you're having issues with.

Kind regards,

Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature

Shada Bahassan

unread,
Nov 3, 2021, 9:41:27 AM11/3/21
to Django users
Thank you for the prompt response.

I have audio recording files that are compressed using the .ul format. So I'd like to convert it to .wav format in order to read these records. 

I discovered Sox, which assisted me in converting, but I'm not sure how to use it in the command line and django.

Kasper Laudrup

unread,
Nov 3, 2021, 12:02:01 PM11/3/21
to django...@googlegroups.com
On 03/11/2021 14.41, Shada Bahassan wrote:
>
> I have audio recording files that are compressed using the .ul format.
> So I'd like to convert it to .wav format in order to read these records.
>

Without having any exerience with SoX, it does sound like something it
should be capable of.

> I discovered Sox, which assisted me in converting, but I'm not sure how
> to use it in the command line and django.
>

I still have no idea what you mean by that. You can launch a process
from Python using the subprocess module I mentioned earlier and pass
command line arguments with that module.

You can use subprocess from your Django code just like you can use any
other Python code.

What exactly are you trying to achieve? Maybe try to describe a bit on a
higher level ignoring SoX, process argument handling and maybe even
Django for now.

Kind regards,

Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages