This forum has been archived. All content is frozen. Please use KDE Discuss instead.

"Could not copy model to destination" error with Simon

Tags: None
(comma "," separated)
kden
Registered Member
Posts
3
Karma
0
Hello! I am getting carpal tunnel surgery this week... looks like I should have started using Simon sooner! ;D I'm hoping to use it to take some stress off my wrists and hands during recovery time.

I am running Ubuntu 16.04 LTS. It was a bit of a struggle to get everything installed, since I did not find the correct documentation in the correct order. I optimistically ran "sudo apt-get installl simon" and then had to work backwards from there when I hit errors. I'm including the steps I went through here as best I can reconstruct them, because I know otherwise there will be a lot of "didn't you read the handbook/read the wiki/Google"? I did/have been. I know my steps are not clean and perfect.

My installation (skip this for now if you don't care):

Code: Select all
sudo apt-get install simon
## Got error in simon writing to simonbasemodels.knsregistry
cd ~/.kde/share/apps/knewstuff3/
touch simonbasemodels.knsregistry
sudo apt-get install libx11-dev
## untar the HTK model I've downloaded
tar -zxvf HTK_AcousticModel-2016-11-29_16kHz_16bit_MFCC_O_D.tgz
## download the HTK source code to htk directory
## in directory HTK where I've download the HTK model source code
sudo apt-get install mkfa
sudo apt-get install julius
sudo apt-get install htk
sudo apt-get install libc6-dev-i386
sudo apt-get install sphinxbase-utils
linux32 bash
./configure
make all
## Encountered an error here.  Had to go into HLMTools/Makefile line 77 and replace 8 spaces with a tab to get make to work
make all
sudo make install
sudo apt-get install sphinxtrain
sudo apt install pocketsphinx
##  Found the wiki at https://userbase.kde.org/Simon/Installation !
sudo apt-get install build-essential libx11-dev libasound2-dev
## Copy my HTK source code to htk_64 directory, remove m32 from configure.ac and install again
## leave the linux32 bash shell since wiki says we can use 64-bit
exit
cp -rp htk/ htk_64
cd htk_64
vi configure.ac
autoconf
./configure
make
sudo make install


ANYWAY, at this point I can't quite get Simon to work.
I downloaded the following addins:
    [EN/VF] Mouse
    [EN/VF] Keyboard USA
    [EN/VF] Menu Navigation

If for acoustic model, I choose the downloaded HTK model as a static model, it sort of works. However, it is extremely inaccurate. For example, I say "open keyboard" and it says "alt c" in the blue popup which I believe is supposed to display what I said.

If for acoustic model, I choose the downloaded HTK model and select "Adapt base model using training samples" Gives the following error:
Could not re-align model to the selected base model. This error is often caused when you are trying to adapt to a model with a different phoneme set. Ideally you should use the same dictionary as the basemodel. This error also occurs if you have no training data to adapt to!
No speech is recognized after this.

If for acoustic model, I choose "Do not use a base model", I get the error (with details):
As the server compiled the model the following error occurred:
Could not copy model to destination
/usr/bin/sphinxtrain -t default{0d8aaae7-19e2-45ae-ba11-52055853782b} setup
Sphinxtrain path: /usr/lib/sphinxtrain
Sphinxtrain binaries path: /usr/lib/sphinxtrain
Setting up the database default{0d8aaae7-19e2-45ae-ba11-52055853782b}

/usr/bin/sphinxtrain run
MODULE: 000 Computing feature from audio files
Feature extraction is done
MODULE: 00 verify training files
Phase 1: Checking to see if the dict and filler dict agrees with the phonelist file.
Found 16 words using 24 phones
Phase 2: Checking to make sure there are not duplicate entries in the dictionary
Phase 3: Check general format for the fileids file; utterance length (must be positive); files exist
Phase 4: Checking number of lines in the transcript file should match lines in fileids file
Phase 5: Determine amount of training data, see if n_tied_states seems reasonable.
Estimated Total Hours Training: 0.0116944444444444
ERROR: Not enough data for the training, we can only train CI models (set CFG_CD_TRAIN to "no")
Phase 6: Checking that all the words in the transcript are in the dictionary
Words in dictionary: 13
Words in filler dictionary: 3
Phase 7: Checking that all the phones in the transcript are in the phonelist, and all phones in the phonelist appear at least once
Sphinxtrain path: /usr/lib/sphinxtrain
Sphinxtrain binaries path: /usr/lib/sphinxtrain
Running the training
No speech is recognized after this.

I'd be happy just getting the third alternative to work. Honestly, I just want to get right to using and customizing it, and I'm not interested today in the machine learning under the hood. (Maybe later.) I'm not familiar with the underlying dependencies, like Sphinxtrain, so I'm not sure if I should debug them individually. I'd really appreciate it if someone could give me a next step for troubleshooting the "Do not use a base model" option which gives me the "Could not copy model to destination" error.
kden
Registered Member
Posts
3
Karma
0
Looking at the error message I got from Sphinxtrain, I concentrated on this line:

ERROR: Not enough data for the training, we can only train CI models (set CFG_CD_TRAIN to "no")


I found my sphinx_train.cfg file in /usr/lib/sphinxtrain/etc and set CFG_CD_TRAIN to "no" as suggested.

At least now I get an error message that makes more sense:
As the server compiled the model the following error occurred:
Too little training material available.

Please train your acoustic model by recording samples.


From the GUI, I'm not confident that by pressing the "Start training" button that I'm not just recording over the same data. If I go through these many times will it add to my training data sets or is it overwriting my samples for each phrase? And if I do read them over and over, approximately how many times do I need to read each command before there will be enough data? (With and without CFG_CD_TRAIN?)
User avatar
MadMartian
Registered Member
Posts
14
Karma
0
Did you manage to resolve this? did training the model make the error message go away?
AFAIK training an adaptive model doesn't overwrite existing data, it appends to it. There is even a mini-revision control system under the Recognition -> Synchronization tab in settings.

I'm running into this issue as well, I am using the following AFAIK:
SphinxTrain: 1.0.8+5prealpha-3
Qt: 4.8.7
KDE Development Platform: 4.14.16
Simon: 0.4.1
Speech Model: HUB4 WSJ (Created: 12/20/12 8:00 PM)
Scenario: [EN/H4W] Firefox

Voice recognition worked initially until I started experimenting by training the model and now it doesn't recognize anything. Additionally this error message pops up repeatedly every few seconds, which is quite aggravating xD .
kden
Registered Member
Posts
3
Karma
0
I gave up trying to understand Simon. On the plus side, my wrist surgery went well. :)


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]