Commit deb26b2f authored by Anthony Larcher's avatar Anthony Larcher
Browse files

Merge branch 'dev'

# Conflicts:
#	docs/build/doctrees/bosaris/detplot.doctree
#	docs/build/doctrees/environment.pickle
#	docs/build/doctrees/frontend/io.doctree
#	docs/build/doctrees/libsvm/libsvm_core.doctree
#	docs/build/doctrees/sidekit.doctree
#	docs/build/doctrees/sidekit_io.doctree
#	docs/build/doctrees/statserver.doctree
#	docs/build/html/_modules/features_server.html
#	docs/build/html/_modules/frontend/features.html
#	docs/build/html/_modules/frontend/io.html
#	docs/build/html/_modules/frontend/normfeat.html
#	docs/build/html/_modules/sidekit_io.html
#	docs/build/html/_modules/statserver.html
#	docs/build/html/featuresserver.html
#	docs/build/html/frontend/features.html
#	docs/build/html/frontend/io.html
#	docs/build/html/genindex.html
#	docs/build/html/index.html
#	docs/build/html/libsvm.html
#	docs/build/html/libsvm/libsvm_core.html
#	docs/build/html/objects.inv
#	docs/build/html/py-modindex.html
#	docs/build/html/searchindex.js
#	docs/build/html/tutorial/featureExtraction.html
#	docs/build/html/tutorial/shorttuto.html
#	docs/source/conf.py
#	nnet/feed_forward.py
parent a142ff92
This diff is collapsed.
......@@ -17,16 +17,15 @@
VERSION: '',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="top" title="SIDEKIT documentation" href="../../index.html" />
<link rel="up" title="Module code" href="../index.html" />
<link rel="search" title="Search" href="../../search.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
......@@ -107,7 +106,7 @@
<span class="n">__docformat__</span> <span class="o">=</span> <span class="s1">&#39;reStructuredText&#39;</span>
<div class="viewcode-block" id="rasta_filt"><a class="viewcode-back" href="../../frontend/normfeat.html#frontend.normfeat.rasta_filt">[docs]</a><span class="k">def</span> <span class="nf">rasta_filt</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
<div class="viewcode-block" id="rasta_filt"><a class="viewcode-back" href="../../api/frontend/normfeat.html#frontend.normfeat.rasta_filt">[docs]</a><span class="k">def</span> <span class="nf">rasta_filt</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Apply RASTA filtering to the input signal.</span>
<span class="sd"> </span>
<span class="sd"> :param x: the input audio signal to filter.</span>
......@@ -139,7 +138,7 @@
<span class="k">return</span> <span class="n">y</span><span class="o">.</span><span class="n">T</span></div>
<div class="viewcode-block" id="cms"><a class="viewcode-back" href="../../frontend/normfeat.html#frontend.normfeat.cms">[docs]</a><span class="k">def</span> <span class="nf">cms</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">global_mean</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<div class="viewcode-block" id="cms"><a class="viewcode-back" href="../../api/frontend/normfeat.html#frontend.normfeat.cms">[docs]</a><span class="k">def</span> <span class="nf">cms</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">global_mean</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Performs cepstral mean subtraction</span>
<span class="sd"> </span>
<span class="sd"> :param features: a feature stream of dimension dim x nframes </span>
......@@ -162,7 +161,7 @@
<span class="n">features</span> <span class="o">-=</span> <span class="n">mu</span></div>
<div class="viewcode-block" id="cmvn"><a class="viewcode-back" href="../../frontend/normfeat.html#frontend.normfeat.cmvn">[docs]</a><span class="k">def</span> <span class="nf">cmvn</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">global_mean</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">global_std</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<div class="viewcode-block" id="cmvn"><a class="viewcode-back" href="../../api/frontend/normfeat.html#frontend.normfeat.cmvn">[docs]</a><span class="k">def</span> <span class="nf">cmvn</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">global_mean</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">global_std</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Performs mean and variance normalization</span>
<span class="sd"> </span>
<span class="sd"> :param features: a feature stream of dimension dim x nframes </span>
......@@ -191,7 +190,7 @@
<span class="n">features</span> <span class="o">/=</span> <span class="n">stdev</span></div>
<div class="viewcode-block" id="stg"><a class="viewcode-back" href="../../frontend/normfeat.html#frontend.normfeat.stg">[docs]</a><span class="k">def</span> <span class="nf">stg</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">win</span><span class="o">=</span><span class="mi">301</span><span class="p">):</span>
<div class="viewcode-block" id="stg"><a class="viewcode-back" href="../../api/frontend/normfeat.html#frontend.normfeat.stg">[docs]</a><span class="k">def</span> <span class="nf">stg</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">win</span><span class="o">=</span><span class="mi">301</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Performs feature warping on a sliding window</span>
<span class="sd"> </span>
<span class="sd"> :param features: a feature stream of dimension dim x nframes </span>
......@@ -255,7 +254,7 @@
<span class="n">features</span><span class="p">[</span><span class="n">label</span><span class="p">,</span> <span class="p">:]</span> <span class="o">=</span> <span class="n">stg_features</span></div>
<div class="viewcode-block" id="cep_sliding_norm"><a class="viewcode-back" href="../../frontend/normfeat.html#frontend.normfeat.cep_sliding_norm">[docs]</a><span class="k">def</span> <span class="nf">cep_sliding_norm</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">win</span><span class="o">=</span><span class="mi">301</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">center</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">reduce</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<div class="viewcode-block" id="cep_sliding_norm"><a class="viewcode-back" href="../../api/frontend/normfeat.html#frontend.normfeat.cep_sliding_norm">[docs]</a><span class="k">def</span> <span class="nf">cep_sliding_norm</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="n">win</span><span class="o">=</span><span class="mi">301</span><span class="p">,</span> <span class="n">label</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">center</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">reduce</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Performs a cepstal mean substitution and standard deviation normalization</span>
<span class="sd"> in a sliding windows. MFCC is modified.</span>
......@@ -315,7 +314,7 @@
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2014-16, Anthony LARCHER &amp; Sylvain MEIGNIER &amp; Kong Aik LEE.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.1.
</div>
</body>
</html>
\ No newline at end of file
......@@ -17,16 +17,15 @@
VERSION: '',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="SIDEKIT documentation" href="../index.html" />
<link rel="up" title="Module code" href="index.html" />
<link rel="search" title="Search" href="../search.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
......@@ -113,7 +112,7 @@
<span class="n">__docformat__</span> <span class="o">=</span> <span class="s1">&#39;reStructuredText&#39;</span>
<div class="viewcode-block" id="read_vect"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_vect">[docs]</a><span class="k">def</span> <span class="nf">read_vect</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_vect"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_vect">[docs]</a><span class="k">def</span> <span class="nf">read_vect</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Read vector in ALIZE binary format and return an array</span>
<span class="sd"> </span>
<span class="sd"> :param filename: name of the file to read from</span>
......@@ -127,7 +126,7 @@
<span class="k">return</span> <span class="n">numpy</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">data</span><span class="p">)</span></div>
<div class="viewcode-block" id="read_matrix"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_matrix">[docs]</a><span class="k">def</span> <span class="nf">read_matrix</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_matrix"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_matrix">[docs]</a><span class="k">def</span> <span class="nf">read_matrix</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Read matrix in ALIZE binary format and return a ndarray</span>
<span class="sd"> </span>
<span class="sd"> :param filename: name of the file to read from</span>
......@@ -198,7 +197,7 @@
<span class="n">mf</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">struct</span><span class="o">.</span><span class="n">pack</span><span class="p">(</span><span class="s2">&quot;&lt;&quot;</span> <span class="o">+</span> <span class="s2">&quot;l&quot;</span> <span class="o">*</span> <span class="n">m</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">*</span> <span class="n">m</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="o">*</span><span class="n">data</span><span class="p">))</span>
<div class="viewcode-block" id="read_pickle"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_pickle">[docs]</a><span class="k">def</span> <span class="nf">read_pickle</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_pickle"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_pickle">[docs]</a><span class="k">def</span> <span class="nf">read_pickle</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read a generic pickle file and return the content</span>
......@@ -242,7 +241,7 @@
<span class="n">write_dict_hdf5</span><span class="p">(</span><span class="n">d</span><span class="p">,</span> <span class="n">output_filename</span><span class="p">)</span>
<div class="viewcode-block" id="read_tv_hdf5"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_tv_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_tv_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_tv_hdf5"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_tv_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_tv_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read the TotalVariability matrix, the mean and the residual covariance from a HDF5 file.</span>
......@@ -277,7 +276,7 @@
<span class="n">f</span><span class="o">.</span><span class="n">create_dataset</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">value</span><span class="p">)</span>
<div class="viewcode-block" id="read_key_hdf5"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_key_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_key_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
<div class="viewcode-block" id="read_key_hdf5"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_key_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_key_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read key value from a HDF5 file.</span>
......@@ -290,7 +289,7 @@
<span class="k">return</span> <span class="n">f</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">key</span><span class="p">)</span><span class="o">.</span><span class="n">value</span></div>
<div class="viewcode-block" id="read_dict_hdf5"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_dict_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_dict_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_dict_hdf5"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_dict_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_dict_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read a dictionary from an HDF5 file.</span>
......@@ -327,7 +326,7 @@
<span class="n">fletcher32</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<div class="viewcode-block" id="read_norm_hdf5"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_norm_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_norm_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_norm_hdf5"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_norm_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_norm_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read normalization parameters from a HDF5 file.</span>
......@@ -370,7 +369,7 @@
<span class="n">fletcher32</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<div class="viewcode-block" id="read_plda_hdf5"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_plda_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_plda_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_plda_hdf5"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_plda_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_plda_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read a PLDA model from a HDF5 file.</span>
......@@ -434,7 +433,7 @@
<span class="n">fletcher32</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<div class="viewcode-block" id="read_fa_hdf5"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.read_fa_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_fa_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<div class="viewcode-block" id="read_fa_hdf5"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.read_fa_hdf5">[docs]</a><span class="k">def</span> <span class="nf">read_fa_hdf5</span><span class="p">(</span><span class="n">input_filename</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Read a generic FA model from a HDF5 file</span>
......@@ -459,7 +458,7 @@
<span class="k">return</span> <span class="n">mean</span><span class="p">,</span> <span class="n">f</span><span class="p">,</span> <span class="n">g</span><span class="p">,</span> <span class="n">h</span><span class="p">,</span> <span class="n">sigma</span></div>
<div class="viewcode-block" id="h5merge"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.h5merge">[docs]</a><span class="k">def</span> <span class="nf">h5merge</span><span class="p">(</span><span class="n">output_filename</span><span class="p">,</span> <span class="n">input_filename_list</span><span class="p">):</span>
<div class="viewcode-block" id="h5merge"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.h5merge">[docs]</a><span class="k">def</span> <span class="nf">h5merge</span><span class="p">(</span><span class="n">output_filename</span><span class="p">,</span> <span class="n">input_filename_list</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Merge a list of HDF5 files into a new one.</span>
......@@ -481,7 +480,7 @@
<span class="n">fo</span><span class="o">.</span><span class="n">create_dataset</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">data</span><span class="o">=</span><span class="n">value</span><span class="p">)</span></div>
<div class="viewcode-block" id="init_logging"><a class="viewcode-back" href="../sidekit_io.html#sidekit_io.init_logging">[docs]</a><span class="k">def</span> <span class="nf">init_logging</span><span class="p">(</span><span class="n">level</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<div class="viewcode-block" id="init_logging"><a class="viewcode-back" href="../api/sidekit_io.html#sidekit_io.init_logging">[docs]</a><span class="k">def</span> <span class="nf">init_logging</span><span class="p">(</span><span class="n">level</span><span class="o">=</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">,</span> <span class="n">filename</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Initialize a logger</span>
......@@ -537,7 +536,7 @@
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2014-16, Anthony LARCHER &amp; Sylvain MEIGNIER &amp; Kong Aik LEE.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.8.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.1.
</div>
</body>
</html>
\ No newline at end of file
Acoustic parametrization
========================
This part of the documentation details the different tools for acoustic parameters extraction, storage and usage.
In **SIDEKIT**, low level interface for acoustic parametrization is implemented in the ``frontend``
module.
Two high level classes allow a fast and simple extraction of acoustic parameters:
- ``FeaturesExtractor``
- ``FeaturesServer``
Before introducing those objects, we give a brief description of the HDF5 format that is used to store and exchange
acoustic features. The HDF5 format is the prefered serialization format in **SIDEKIT**.
.. toctree::
:maxdepth: 2
hdf5
featuresextractor
featuresserver
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment