Main
Intro
Download
Copyright


Manuals
Users'
Programmers'
Developers'
FAQ

Appendix
Team, Friends & Links




Users' Manual

by Holger Crysandt


This section is dedicated to everyone who wants to create MPEG-7 descriptions from an audio signal without working on the source code.

To run the demo Java2, Version 1.4 or higher is required. It can be downloaded at http://java.sun.com. To get the version of your current installation type:

java -version.

Graphical User Interface

A graphical user interface for the library is available http://mpeg7audioenc.sf.net/MPEG7AudioEncApp.jnlp.

It uses Java Web Start which automatically downloads the main application and all libraries needed. Once installed it looks for updates every time the program is launched again. But is also possible to use the application offline. If Java Web Start can not download the application the proxy configuration might not be configured correctly. See the FAQ for more information.

Ant

If Ant is installed on your system you can use it to create your MPEG-7 descriptions.

With the sources comes the file build.xml. It includes a task mp7encode which was designed to create an MPEG-7 description of an audio file. Path and filename are parsed to ant using the infile property.

ant -Dinfile=audio.wav mp7encode

By default the MPEG-7 description is written to the file out.mp7. A different file name can be set using the outfile property:

ant -Dinfile=audio.wav -Doutfile=myout.mp7 mp7encode

It might also possible configure the extracted descriptors. The configuration file is given to the encoder with mpeg7audioenc.config property:

ant -Dinfile=audio.wav -Dmpeg7audioenc.config=myconfig.xml mp7encode

The structure of the config file will be described later.

Command line

To create a MPEG-7 description from an audio-file by typing the following command in your shell (Unix/Linux) or command-line (Windows):

java -jar MPEG7AudioEnc.jar [path/]audio{.wav|.au|.aiff}

The audio file can have any sampled format which is supported by the current java version by default. MP3-files are only supported if the mp3-decoder library is installed in your classpath. By default the MPEG-7 description is sent to the standard output (display). To store the data is either possible to write it into a file:

java -jar MPEG7AudioEnc.jar [path/]audio{.wav|.au|.aiff} > audio.mp7

or to pipe it into another application:

java -jar MPEG7AudioEnc.jar [path/]audio{.wav|.au|.aiff} more.

To configure the encoder a configuration file in xml7-format can be parsed as second parameter. The structure of the configuration file is described later.

From Java version 1.4 to 1.5 the default xml-parser the default parser changed from Crimson to Xerces. The Encoder automatically detects which parser is available and uses it. No additional xml-parser is needed. But it possible to use another parser. Since this feature is mainly interesting for programmers or developers it will be described later.

XML Configuration File

If you are interested in only a subset of descriptors you can parse a config file as second parameter in XML-format. The easiest way to create a valid xml-configuration file is to use the Options!Edit/Save dialog of the graphical user interface (3.1). But is also possible to edit the configuration file with your favorite text editor.

The xml-configuration file is checked against a XML Schema description which is included in mpeg7audioenc.xsd. This file is included in the archive file MPEG7AudioEnc.jar

Modules with their parameters

Module Parameter Type Default
AudioFundamentalFrequency lolimit
hilimit
decimal
decimal
50.0
12,000.0
AudioSignature decimation integer 32
AudioSpectrumBasisProjection frames
numic
integer
integer
0
5
AudioSpectrumEnvelope loEdge
hiEdge
resolution
decimal
decimal
decimal
62.5
16,000.0
1.0
AudioSpectrumFlatness loEdge
hiEdge
decimal
decimal
250.0
16,000.0
AudioTempoType loLimit
hiLimit
ATTHopsize
integer
integer
integer
40
200
3000
HarmonicPeaks nonHarmonicity
threshold
decimal
decimal
0.15
0.0
SignalEnvelope windowlength
windowslide
integer
integer
10
5
Resizer HopSize integer 10
SoundModel numberOfStates
label
integer
string
12
mylabel

The default parameters can also be found in class de.crysandt.audio.mpeg7audio.ConfigDefault or the XML Schema Description which is included in the archive file (mpeg7audioenc.xsd).

Modules with MPEG-7 output

The following modules create MPEG-7 information. They have an additional attributed (enable="yes|no") to enable the MPEG-7 output.

  • AudioFundamentalFrequency
  • AudioHarmonicity
  • AudioPower
  • AudioSignature
  • AudioSpectrumCentroidSpread
  • AudioSpectrumEnvelope
  • AudioSpectrumFlatness
  • AudioSpectrumBasisProjection
  • AudioTempoType
  • AudioWaveform
  • HarmonicPeaks
  • HarmonicSpectralCentroid
  • HarmonicSpectralDeviation
  • HarmonicSpectralSpread
  • HarmonicSpectralVariation
  • LogAttacTime
  • Silence
  • SoundModel
  • SignalEnvelope
  • SpectralCentroid
  • TemporalCentroid
  • BackgroundNoiseLevel
  • BandWidth
  • Click
  • DcOffset
  • DigitalClip
  • LogAttackTime
  • SampleHold

Example of a configuration file

A short configuration file is shown below. If you want to extract more descriptors you have to enable them and add the configuration of the corresponding modules in the XML configuration file.


<?xml version="1.0" encoding="UTF-8"?>
<Config 
  xmlns="http://mpeg7audioenc.sf.net/mpeg7audioenc.xsd"
  xmlns:mp7ae="http://mpeg7audioenc.sf.net/mpeg7audioenc.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://mpeg7audioenc.sf.net/mpeg7audioenc.xsd
  	http://mpeg7audioenc.sf.net/mpeg7audioenc.xsd">

<!-- set hop size for all modules -->
<Module xsi:type="Resizer">
  <HopSize>10</HopSize>
</Module>

<!-- Enable AudioWaveformType -->
<Module xsi:type="AudioWaveform" mp7ae:enable="true" />

<!-- Enable AudioSpectrumEnvelope with loEdge=62.5Hz, hiEdge=16kHz and ocave resolution=1.0 -->
<Module xsi:type="AudioSpectrumEnvelope" mp7ae:enable="true">
  <loEdge>62.5</loEdge>
  <hiEdge>16000.0</hiEdge>
  <resolution>1.0</resolution>
</Module>

</Config>


Remark: If your editor can validate XML it needs a XML schema description. This description is stored in the file mpeg7audioenc.xsd on this site. Give your editor the link to this file and it will be able to give you more advice how to edit the configuration.
Last updated: 2009-06-13SourceForge.net Logo