2010-08-11
0.3

&kmyapplication; is the server component of the ssc sample acquisition tool.

KDE
kdeutils
Kapp
Simon
sample
speech
voice
acquisition
recording
accessibility
&FDLNotice;
2009-2010
Peter Grasch
Peter
H.
Grasch
peter.grasch@bedahr.org

# The &kmyapplication; Handbook

## Introduction

&kmyapplication; is the server component of the ssc sample acquisition tool.

It manages speaker data (users, institutions) as well as sample meta data using a database and stores the samples.

It receives input from the ssc client(s) which connect to the server using TCP/IP.

For more information on the general architecture of the Simon suite please see the Simon manual. For information about the ssc client, please refer to the SSC manual.

## Using &kmyapplication;

&kmyapplication; is a command line application which does not have any user interface. There are no special launch parameters.

### Base folder

The base folder of &kmyapplication; contains the configuration file `sscd.conf` and an error log in case something goes wrong. This folder also contains the `samples` subfolder where all the samples are stored.

The location of the sscd folder depends on your operating system:

#### ssc base folder

Microsoft Windows | GNU/Linux
--- | ---
`Installation folder of sscd.exe (usually: C:\Program Files\simon 0.3\bin\sscd.exe`) | `/usr/share/sscd`

### Configuration

There is no graphical configuration of sscd, but there is a configuration file (`sscd.conf`) stored in the sscd folder.

The default configuration file is heavily commented and should be self-explanatory.

Before running sscd, you will want to at least change the DatabaseUser and DatabasePassword entry of the configuration file. See the database section for more information.

    ; This is an example config file and displays the built-in defaults
    ; sscd will look for this file in:
    ; Linux:
    ;    /usr/share/sscd/sscd.conf
    ; Windows:
    ;    <sscd installation path>\sscd.conf

    [General]
    ; Change this to use a different database; Because sscd uses db-specific
    ; commands in places, only QMYSQL is supported at the moment.
    ; Support for other DBMS can be added extremely easily, though so please
    ; feel free to request support through kde-accessibility@kde.org
    DatabaseType=QMYSQL

    ; The host of the DBMS
    DatabaseHost=127.0.0.1

    ; The port of the DBMS; 3306 is the default port of MySQL
    DatabasePort=3306

    ; The database to use; Make sure that you run the supplied create script
    ; before you use sscd
    DatabaseName=ssc

    ; The username to use when connecting to the DBMS
    DatabaseUser=sscuser

    ; Database password. The default one will obviously not work in most cases
    DatabasePassword=CHANGE ME NOW

    ; Database options. Refer to Qts documentation of QSqlDatabase for details
    DatabaseOptions=MYSQL_OPT_RECONNECT=1

    ; The port the server will listen to; Default: 4440
    Port=4440

    ; Bind the server to a specific client IP; If this is true, the server
    ; will ignore requests from all but the BoundHost (see below)
    Bind=false

    ; IP of the bound host (if Bind is active)
    BindHost=127.0.0.1

### Database

&kmyapplication; stores the speaker and sample data (but not the samples themselves) in a database. At the moment, only MySQL databases are fully supported. Adding support for a new database is trivial, though. Contact the Simon team if you want to help.

To set up the required tables &kmyapplication; ships with an appropriate create script `mysql_create_script.sql` installed in the base folder of &kmyapplication;.

Database errors can be found in the `error.log` which also resides in the base folder.

### Extracting collected samples

To build models using the samples collected with &kmyapplication; you first have to extract them from the database.

Because &kmyapplication; is designed for large scale sample acquisition this is not end user friendly. The documentation below is mainly provided for technically skilled professionals.

Most of the scripts below require the GNU tools (usually available by default on GNU/Linux).

You can use the following query (minor adjustments will be necessary depending on what samples exactly you need):

    use ssc;

    select s.Path, s.Prompt
      from Sample s inner join User u
        on s.UserId = u.UserId inner join UserInInstitution uii
          on u.UserId = uii.UserId inner join SampleType st
            on s.TypeId = st.SampleTypeId inner join Microphone m
              on m.MicrophoneId = s.MicrophoneId
      WHERE st.ExactlyRepeated=1 and uii.InstitutionId = 3
        and (m.MicrophoneId = 1);

This query will list all samples from institution 3 that were recorded with microphone 1.

You can then for example use this script to create a prompts file:

          #!/bin/bash
          sed '1d' $1 > temp_out
          sed -e 's/\\\\/\//g' -e 's/.*Samples\///g' -e 's/\.wav\t/ /' temp_out > $1
          rm temp_out

This prompts file can then be imported in Simon.

To build the appropriate dictionary to compile the model you might also want to list all the sentences contained in the prompts file. You can do this with this script:

          #!/bin/bash
          cat $1 | sed -e 's/[0-9\/]* //' | sort | uniq

## Questions and Answers

In an effort to keep this section always up-to-date it is available at our online wiki.

## Credits and License

&kmyapplication;

Program copyright 2008-2010 Peter Grasch peter.grasch@bedahr.org

Documentation Copyright © 2009-2010 Peter Grasch peter.grasch@bedahr.org

&underFDL;

&underGPL;

## Installation

Please see our wiki for install instructions.

&documentation.index;