Documentation

From Aparat

Contents

Installation

This page describes the installation and usage of TKK Aparat.

Prerequisites

Matlab, and by extension TKK Aparat, requires a decent computer to operate well. Generally, any Pentium 4 or Athlon (or newer) computer with a CPU frequency of at least 1 GHz should do. 512 MB of memory should be enough for normal use. While TKK Aparat itself takes very little disk space, the required Matlab installation (either full Matlab or the Matlab Component Runtime) takes several hundred megabytes of disk space. In practice, this should not be a problem with contemporary hardware.

TKK Aparat can be used on any platform for which Matlab is available. However, the development is done on Linux, and the releases are tested on Linux and Windows XP. There might be slight issues with other operating systems.

If TKK Aparat is used within a Matlab environment (instead of the standalone package, that is), the Matlab revision has to be at least 2007a. Older ones cannot be supported due to frequently changing user interface description file format. However, the underlying functionality should work perfectly well with older versions as well (at least from Matlab 7.0 upwards). Signal processing toolkit is also an absolute requirement, as most of the underlying functionality requires its presence. LF-model fitting also requires the optimization toolkit.

Installation in Matlab environment

TKK Aparat extensively uses Matsig, an object-oriented signal processing library for MATLAB. Previous releases of TKK Aparat required Matsig to be separately installed, but beginning from version 0.3.0, Matsig is included in the stable releases of TKK Aparat.

To use the development versions fetched from the SVN repository, Matsig needs to be separately installed. Fetch Matsig from http://matsig.sourceforge.net/ and install it. Matsig can be installed just by just uncompressing the package to a suitable directory and adding the matsig directory to your MATLAB path either using the addpath command or using the user interface (File - Set Path...).

The actual installation is performed by uncompressing the software package to a suitable location, for example, under your own MATLAB working directory. Aparat can then be executed by issuing the command aparat.

Optionally, the Aparat directory may be added to the MATLAB working path either using the 'addpath' command or using the user interface (File - Set Path...).

To make the path settings stick in UNIX/Linux, you can also create the file ~/matlab/startup.m and place a line similar to the following there:

addpath /home/mairas/matlab/aparat -end


Installation of Windows standalone version

IMPORTANT: Before TKK Aparat can be run, the Matlab Component Runtime has to be downloaded and installed. Due to its non-open-source licence, it cannot be hosted on SourceForge.net like TKK Aparat itself. Instead, it can be downloaded at:

http://www.acoustics.hut.fi/software/aparat/downloads/MCRInstaller_2007a.exe

The Matlab Component Runtime can be installed by double-clicking the file and following the instructions on the screen. You need to have Administrator privileges for the operation.

Currently, no installation program exists for TKK Aparat. Instead, it can be installed by following the steps below:

  1. Create a folder for Aparat, e.g. C:\aparat.
  2. Copy all files from the installation package into that folder.
  3. (Optional) Create a shortcut to Aparat.exe on the desktop by right-clicking the desktop, selecting New -> Shortcut, and then selecting Aparat.exe.

Now, TKK Aparat may be run by double-clicking the Aparat.exe file or the corresponding shortcut.

Description of user interface elements

This section describes the different user interface windows and elements of TKK Aparat. Click the thumbnails to see the full-size images of the windows.

Main window

Main window
Enlarge
Main window
File list
All wave files of the current directory are shown in the file list. The file may be opened in Aparat by clicking it.
Inverse filtering method
The inverse filtering method can be selected using the popup menu. Currently only IAIF and DIF methods are implemented.
Inverse filtering settings
The inverse filtering settings control the actual IF parameters. In IAIF and DIF, the number of formants and the lip radiation coefficient value are the most important settings. They may be set either by typing the values, pressing the arrow buttons, or clicking the Pick button, yielding in the pick window illustrated below.
As a rule of the thumb, there should be about one formant for each one kilohertz of bandwidth. For example, if the sampling frequency is 8 kHz, the bandwidth is half of that (4 kHz), and the number of formants should be around four.
The parameters should be set so that the closed phase would be maximally flat, there would be no visible harmonic resonances, and the closing instant would be as pronounced as possible. Appropriate values for the lip radiation parameter range usually from 0.98 to 1.
Menu bar
The main window menu bar may be used to access additional functionality of Aparat, such as opening other directories, aggregating (combining) data, selecting channels, displaying different alternate views of the data, and so on.


Parameter picking view

Signal view
Enlarge
Signal view

The parameter values in the main window may be visually selected by pressing the Pick buttons, causing a view similar to the one on the left to appear. In this view, the optimal parameter value (in the example, the fourth from above) may be selected by visual inspection and by clicking the appropriate curve, causing the parameter values in the main window to be updated.


Signal view

Signal view
Enlarge
Signal view
Signal waveform
The upmost signal pane shows the signal waveform of the whole loaded pressure signal. A portion of the signal may be selected for analysis either be clicking (in which case the selection is moved to that position without changing its length) or dragging (which changes both the location and the length of the selection) the mouse
Glottal flow and glottal flow derivative
The two lower signal panes show the glottal flow and its first time derivative. Furthermore, it may show extra information such as the the fitted LF model and the parameterization time instants.
Signal details
Signal parameters are displayed in the Signal panel. First, the signal may be flipped vertically (multiplied by -1) by checking the Flip checkbox. Second, the sampling frequency is shown in the fs popup menu. Generally, the lower the sampling frequency, the easier the sampling frequency task is. However, narrowing the bandwidth naturally discards high-frequency data.
Selection details
Selection parameters are shown in the Selection panel. The selection size, shown in both milliseconds and samples, may be adjusted by modifying the textbox values. The fundamental frequency calculated from the analysis frame is also shown. It is a parameter that should be followed; if its value is something over 600 Hz, the detection has very likely failed, and the inverse filtering probably will fail as well. Finally, the analysis frame may be played back using the Play button.
Quality & comments
Metadata regarding the signal may be given in the Quality & Comments panel. This metadata is useful for example when the unsuccessfully inverse filtered samples are discarded from the data set.
Save button
All data regarding the current signal including the waveforms and parameter data may be saved into a standard MATLAB .mat file by pressing the Save button.


Spectrum view

Spectrum view
Enlarge
Spectrum view
Spectra
The graph on the page shows the signal spectra. The thin green line illustrates the original speech pressure signal. The thick red and green ones are the estimated glottis and vocal tract filter spectra, while the thin red one is the acquired glottal flow estimate. The peaks of the vocal tract filter are also shown as formant estimates.
Graph checkboxes
The checkboxes at the top of the window may be used to control the visibility of the different spectra.
Scale panel
The scale panel at the lower right corner allows for the selection of either a linear or a logarithmic frequency scale.


Parameter view

Parameter view
Enlarge
Parameter view

The parameter view shows the different time-based, frequency-based, and LF-model parameters.

Time-based
The values of the time-based parameters are shown in the Time-based panel. The parameters are described on the Glottaltimeparams.m page. Show buttons control whether the parameter time instants are plotted on the Signal view.
Frequency-based
The following frequency-based parameters are supported: ΔH12 (H1-H2), PSP (the parabolic spectrum parameter), and HRF (harmonic richness factor).
LF-model
LF-model fitting is also supported, but has to be performed separately by clicking the Evaluate button due to its heavy computational requirements.
Grouping
The Grouping popup menu controls the grouping function for the parameters. Since multiple time and LF-model values may be calculated for each analysis window, the grouping function defines how they are combined to a single value.


Other views

Z-plane view
Enlarge
Z-plane view

The z-plane view shows the poles of the vocal tract and glottis filters on the z-plane. There should be no vocal tract poles on the real (horizontal) axis. If there are, the Options -> Remove real poles menu item on the main window can be used to remove them.


Vocal tract view
Enlarge
Vocal tract view

The vocal tract view shows a plot of the cross-sectional diameters of the tube model derived from the vocal tract filter.



Phase-plane view with no unfiltered resonances
Enlarge
Phase-plane view with no unfiltered resonances
Phase-plane view with an unfiltered resonance
Enlarge
Phase-plane view with an unfiltered resonance

The phase plane views can be used to assess the quality of the inverse filtering task. Any remaining resonances in the glottal flow are shown in the phase plane plot as loops in the trajectory as shown in the right-hand side figure. If the loops are non-existent or small as in the left figure, the inverse filtering may be considered to have been successful.