Simon/Troubleshooting Guide

From KDE UserBase Wiki
Revision as of 15:02, 12 July 2012 by Bedahr (talk | contribs)

Simon is a very complex software. As such, a lot of components have to get along for Simon to work correctly.

If something does go wrong, however, it doesn't have to mean that Simon is completely broken and you have to start over again.

This page aims to gather those common mistakes and provide simple solutions.

Running into a problem that is not mentioned here? Please contact us!

Simon on Ubuntu

To run Simon on Ubuntu or distributions based on it you first need to download and install an updated libportaudio package like the one provided on our Sourceforge download page: http://sourceforge.net/projects/speech2text/files/.

If you use pulseaudio (default on Ubuntu but not on e.g. Kubuntu) you need to uninstall / disable it. Please refer to the documentation of your distribution for more information.

With Ubuntu Natty Narwhal and version 0.3.0 of Simon you can safely use the vanilla installation of ubuntu without any changes.

Installation

This section covers errors that might occur when installing Simon

Binary Installation

Problem: I tried to update Simon but the version numbers in Help > About Simon stayed the same.

Solution (Windows): The installer of Simon will silently ignore files that are currently in use. It is possible that some process are still running even when you close all Simon processes. Open your Task-Manager by pressing control, alt and escape together. Switch to the "Processes" tab and stop the following processes (if they are running):

  • dbus-daemon
  • klauncher
  • kioexec
  • kded4
  • kioslave
  • Simon
  • Simond
  • KSimond


Problem: When trying to install the Debian package on a Debian based System, I get an error message that the package cannot be installed.

Solution (Linux): You might have old versions of julius or voxforge-julius installed. Uninstall those packages before installing Simon.


Problem: After a failed installation of Simon I can not use apt-get to remove it or install / update any other packages.

Solution (Linux): Remove Simon by executing the following commands:

sudo rm /var/lib/dpkg/info/Simon.postrm 
sudo dpkg --remove --force-all Simon

Compiling from Source

Problem: CMake reports missing packages.

Solution: Did you install all the needed dependancies? See the instructions for setting up a Simon development environment for more detail.


Problem: CMake Error at /usr/share/kde4/apps/cmake/modules/FindPhonon.cmake.

Solution: Did you upgrade to (K)Ubuntu Karmic lately? sudo apt-get --reinstall install libqt4-phonon-dev fixes this.


Problem: CMake Error at <path-to-Simonsource>/cmake/FindQwt6.cmake.

Solution: Have you installed the latest version of qwt? If so, look in /usr/local for a directory named like qwt-6.x.x. Edit FindQwt6.cmake and fix the occurence of the path to qwt-6.x.x according to the version you have installed in /usr/local.

General Usage

Problem: The configuration window of Simon / KSimond is empty.

Solution: Run kbuildsycoca4. It is located in your path on either plattform so you should be able to launch it from the command-line. If you are running Linux, just open a terminal and enter kbuildsycoa4. If you are running Windows, open the run-dialog by holding down your windows key and pressing the r-Key. Now enter kbuildsycoca4 and press return. You need to restart Simon for the changes to take effect.


Problem: Sometimes when I try to start Simon, all I get is a not responding black rectangle in the center of the screen.

Solution (Windows): Some of KDEs system processes may be running but not responding. Open your Task-Manager by pressing control, alt and escape together. Switch to the "Processes" tab and stop the following processes (if they are running):

  • dbus-daemon
  • klauncher
  • kioexec
  • kded4
  • kioslave
  • Simon
  • Simond
  • KSimond


Problem: The recognition gets slower and slower over time.

Solution (Windows): This happens if you use a pseudo sound device - especially one called "SoundMapper Input" or similar. Please use the appropriate hardware device directly to avoid this issue.


Problem: Simon is very unstable and crashes at seemingly random points (without providing any usable backtrace).

Solution (Linux): If you are using pulseaudio (especially on Ubuntu were it is also available per default), please uninstall or disable it in order to use Simon. The problem is caused by issues in portaudios communication with pulseaudio so common workarounds like pasuspender will not help.

Synchronization / Compiling the Model

Problem: When compiling the model I receive an error message similar to: As the server compiled the model the following error occured: Failed to generate monophones. Please check that you have installed the Program HDMan correctly and that the lexicon contains all words referenced by your trainings corpus.

Solution: Have you installed the HTK? See the installation section for instructions on how to install HTK.


Problem: When compiling an adapted model I receive an error message similar to: <codeERROR [+3231] ProcessFile: Incompatible sample kind MFCC_D_A_0 vs MFCC_D_N_Z_0</code

Solution: You are adapting a model with a different model type than the one Simon uses. Most likely you are adapting the Voxforge model. To change Simons model type follow these steps:

  1. Replace the file /usr/share/apps/Simon/scripts/proto (Windows: C:\Program Files\Simon 0.3\share\apps\Simon\scripts\proto or similar) with this one: http://www.dev.voxforge.org/projects/Main/browser/VoxForge/Trunk/Scripts/HTK/AMCreate_scripts/input_files/proto?rev=1564
  2. Edit the file /usr/share/apps/Simon/scripts/config (Windows: C:\Program Files\Simon 0.3\share\apps\Simon\scripts\config or similar) and change TARGETKIND from MFCC_0_D_A to MFCC_0_D_N_Z


Problem: When compiling the model I receive an error message similar to: Couldn't generate dfa. Please check the paths to mkfa and dfa_minmize.

Solution: Please check your grammar. If you click on the "Details" button you will receive a more detailed compilation log. Scroll to the bottom and you will likely see a message similar to the following: Now making nondeterministic finite automaton[3/3] Error: undefined class "ADD"

Now check if your wordlist contains the terminal that is causing the troubles. In this example this would be "ADD". Add a word using the terminal if there is no word that uses it or remove all sentences containing "ADD" from your grammar.


Problem: When the server compiles the model, I receive an error message similar to: String too long

Solution: Words can not start with "'". Other special characters (especially at the beginning of the word) can produce this error.

Sound

Problem: No matter what device I choose, I always get the error message that this configuration is not supported by the device.

Solution (Linux): On Linux you can set up a pseudo ALSA device that will resample sound recorded at a more common configuration (like 44.1kHz, stereo) on the fly (Note: Some distributions package this ALSA capatibility in a package called alsa-plugins or similar which is often not installed by default).

To set up such a configuration, create a file named .asoundrc in your home directory and copy & paste the following text in it:

   pcm.speechinput {
       type plug
       slave {
               pcm "hw:0,0"
               format S16_LE
               channels 1
               rate 16000
       }
 }

After you restarted ALSA (/etc/init.d/alsa-utils restart, or you can just restart your computer) you will have a new input device "speechinput" that automatically downsamples any input to a Simon-appropriate stream.

Note: If the device you want to use for recording is not the first device on the first card, You will have to adjust the values of "pcm" in the configuration file (hw:card,device). You can get an overview of your devices by executing arecord -L in a terminal. Also note that if things still fail, you might want to check if downsampling works outside Simon first, with the command line: arecord -vv -f S16_LE -c1 -r16000 -d 5 test.wav; aplay test.wav and test if you can talk for 5 seconds and play it back at the specified rate.

Now open the Simon sound configuration and set the device to "speechinput" for the recording.