473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Sound file manipulation in Python

Does anyone know of a Python library which handles sound file formats
(MP3, Ogg, FLAC are the three I'm nost interested in). I'd like
something that can manipulate "metadata" - stuff like artist, title,
album tags. I'm not critically interested in format conversion, or
playing sound files - I can handle that with other applications.

I'm using Windows, and Python 2.3, if it matters (as it might for C
extensions).

I can manage with just reading the metadata, but ideally writing
would be useful, too. Multiple libraries is OK, but I need something
more than just MP3.

If there's nothing available for Python, does anyone know of a good C
library that could be wrapped? (Or used via ctypes, maybe).

Thanks,
Paul.
--
Ooh, how Gothic. Barring the milk.
Jul 18 '05 #1
6 3519
On Thu, 26 Aug 2004 22:24:33 +0100, Paul Moore <pf******@yahoo.co.uk> wrote:
Does anyone know of a Python library which handles sound file formats
(MP3, Ogg, FLAC are the three I'm nost interested in). I'd like
something that can manipulate "metadata" - stuff like artist, title,
album tags. I'm not critically interested in format conversion, or
playing sound files - I can handle that with other applications.

I'm using Windows, and Python 2.3, if it matters (as it might for C
extensions).

I can manage with just reading the metadata, but ideally writing
would be useful, too. Multiple libraries is OK, but I need something
more than just MP3.

If there's nothing available for Python, does anyone know of a good C
library that could be wrapped? (Or used via ctypes, maybe).

Thanks,
Paul.
--
Ooh, how Gothic. Barring the milk.
--
http://mail.python.org/mailman/listinfo/python-list


I'm playing with some of those things right now. You may want to look
at mad and id3tag. I know there are several others that allow you to
work with ID3 Tags.
--
Stand Fast,
tjg.
Jul 18 '05 #2
"Paul Moore" <pf******@yahoo.co.uk> wrote in message
news:uu***********@yahoo.co.uk...
Does anyone know of a Python library which handles sound file formats
(MP3, Ogg, FLAC are the three I'm nost interested in). I'd like
something that can manipulate "metadata" - stuff like artist, title,
album tags. I'm not critically interested in format conversion, or
playing sound files - I can handle that with other applications.

I'm using Windows, and Python 2.3, if it matters (as it might for C
extensions).

I can manage with just reading the metadata, but ideally writing
would be useful, too. Multiple libraries is OK, but I need something
more than just MP3.

If there's nothing available for Python, does anyone know of a good C
library that could be wrapped? (Or used via ctypes, maybe).


You may try to use pymedia: http://pymedia.sourceforge.net
There is no writing at this point( but you may add it though ), also FLAC
not supported also.
If you need writing you may need to use ffmpeg/libavformat for that...

Dmitry/
Jul 18 '05 #3

"Paul Moore" <pf******@yahoo.co.uk> wrote in message
news:uu***********@yahoo.co.uk...
Does anyone know of a Python library which handles sound file formats
(MP3, Ogg, FLAC are the three I'm nost interested in). I'd like
something that can manipulate "metadata" - stuff like artist, title,
album tags. I'm not critically interested in format conversion, or
playing sound files - I can handle that with other applications.

I'm using Windows, and Python 2.3, if it matters (as it might for C
extensions).

I can manage with just reading the metadata, but ideally writing
would be useful, too. Multiple libraries is OK, but I need something
more than just MP3.

If there's nothing available for Python, does anyone know of a good C
library that could be wrapped? (Or used via ctypes, maybe).

Thanks,
Paul.
--
Ooh, how Gothic. Barring the milk.


I would try the Snack toolkit at http://www.speech.kth.se/snack/

Highlights
High level sound objects, with flexible storage management and streaming
support.
Multiple simultaneous playback and recording threads (system dependent).

All audio data handled as floating point internally for fast and accurate
computations.
Multi-platform, same scripts usable on Windows 95/98/NT/2K/XP, Linux,
Macintosh, Sun Solaris, HP-UX, FreeBSD, NetBSD, and SGI IRIX.

Script compilation tool included, for easy deployment using stand-alone
executables.

Filters which can be used to process sound objects or during playback for
on-the-fly operation.

Visualization with waveforms, spectrograms, and spectrum sections.
Postscript support.

Real-time visualization/spectrum analysis.

Web enabled, possible to run scripts embedded in web pages through the use
of the Tcl plug-in.

Extensible, new commands, filters, and sound file formats can be added
using the Snack C-library.

Lots of examples included as well as a skeleton C-extension.

Supported sound file formats: WAV, AU, AIFF, MP3, CSL, SD, SMP, and
NIST/Sphere


Tom
Jul 18 '05 #4
"Tom B." <sb******@commspeed.net> writes:
I would try the Snack toolkit at http://www.speech.kth.se/snack/
Looks good, but more focused on manipulation and playback. I couldn't
see any handling of tags/metadata.
Supported sound file formats: WAV, AU, AIFF, MP3, CSL, SD, SMP, and
NIST/Sphere


No Ogg or FLAC :-(

I'll keep it in mind, though.

Paul.
--
"Bother," said the Borg, "We've assimilated Pooh."
Jul 18 '05 #5
"Dmitry Borisov" <jb***@mail.ru> writes:
You may try to use pymedia: http://pymedia.sourceforge.net
Looks nice. I'll give it a try.
There is no writing at this point( but you may add it though ),
Not something I need right now.
also FLAC not supported also.


A pity, but not as important to me as Ogg. How hard is it to add
codecs to pymedia?

Paul.
--
The major difference between a thing that might go wrong and a thing
that cannot possibly go wrong is that when a thing that cannot
possibly go wrong goes wrong it usually turns out to be impossible to
get at or repair. -- Douglas Adams
Jul 18 '05 #6
"Paul Moore" <pf******@yahoo.co.uk> wrote in message
news:uk***********@yahoo.co.uk...
"Dmitry Borisov" <jb***@mail.ru> writes:
You may try to use pymedia: http://pymedia.sourceforge.net


Looks nice. I'll give it a try.
There is no writing at this point( but you may add it though ),


Not something I need right now.
also FLAC not supported also.


A pity, but not as important to me as Ogg. How hard is it to add
codecs to pymedia?


I don't see any special handling for flac. So I suppose it may use regular
raw format for demuxing. In this case, it will be trivial to include
libavcode/flac.c from ffmpeg into pymedia. No changes. For meta tags, you
may need to do a small research and write a simple parser.
Dmitry/
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michael Peuser | last post by:
There is not so much multimedia for Python. So I became quite excited about this nice sound output and manipulation tool. The DLL is not small but it can do a lot of things. Seems that it is in...
5
by: Chris | last post by:
I want a program that can "draw" sound. Imagine drawing a graph of frequency against time - and then being able to play it over the computer speakers. Can this be done in Python? As a...
3
by: Bill Dandreta | last post by:
I posted a message ("Help with my 1st Tkinter program") a few days ago complaining that Python did not have any built in basic cross platform sound capability. I was wrong (at least partly). Python...
10
by: Lynn | last post by:
I have a SuSe 9.1 linux box (although this isn't a new issue) with reasonably up to date everything. When I run PySol, it grabs the sound system in a rude and complete way. I don't listen to...
1
by: talsharf | last post by:
Hi everyone, I have this small problem and I wonder if someone could put me in some direction. I am trying to build a simple sound generator, mainly for playing the sound of a car's engine. I...
3
by: Bradley Jewell | last post by:
I am wanting to be able to take a templated sound file and superimpose other sound files overtop of it. If anyone has any idea's I would appreciate it.
4
by: sittner | last post by:
Hi everyone, I'm looking for a module for sound processing (manipulating sound objets, filters, ffts etc.). I tried Snack, but when i downloaded the package that was supposed to be for python,...
3
by: Memozio | last post by:
Is there a library in python that has methods applicable to volume(in terms of sound) of a given file? For example if it can check if the sound volume of a file is on the same level for the entire...
2
by: Woot4Moo | last post by:
Hey guys I am running Windows XP and am having an issue with a game that my team has created. Whenever an audio file is played it creates a very distorted, crackly sound. Any ideas what could be...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.