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

simon sphinx "could not create base model container"

Tags: None
(comma "," separated)
kgolubev
Registered Member
Posts
33
Karma
0
Hello!
I'm trying to create russian basemodel.
I downloaded russian accoustic model package from voxforge. http://www.repository.voxforge1.org/downloads/Russian/Trunk/AcousticModels/AcousticModels.tgz
I start ksimond in Konsole, set all executables for sphinxtrain (some vere missing, why?). Then in annother Konsole window start simon.
In Simon I press "Create from model files", enter all needed files from AcousticModels, Then press OK and simon reports - "could not create base model container"
In simond output i see this:
Code: Select all
 simond(11133) SimondControl::startServer: Starting server listening on port  4444
simond(11133) SimondControl::startServer: Server listening on port   4444
ksimond(11131) KSambaSharePrivate::testparmParamValue: We got some errors while running testparm "Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Warning: Service printers defines a print command, but rameter is ignored when using CUPS libraries.
"
ksimond(11131)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
QFSFileEngine::open: No file name specified
simond(11133) ModelCompilationManagerSPHINX::run: Model adaption failed for user  "default"


Can you please tell me what is wrong? maybe model is incorrect?
And why this samba and cups message appeared? (Or it's just message from filechooser dialog)
kgolubev
Registered Member
Posts
33
Karma
0
Some more info.
I removed all configuration and data
Started with EN/H4W models and scenarios, Passed one training, then removed EN/H4W model and added Russian. Now model works OK
And, I started with EN/H4W window navigation scenario, then turned it off, removed, started new empty scenario(basic window navigation), but all sentences from EN/H4W are still there. Is it a bug or a feature?
Now I have Russian model and scenario, but!
I exported scenario and model to files, removed again all configs and data. Started configuration wizard, added my scenario and model and again "could not create base model container"
It looks like something is missing. Without importing EN/H4W at the begining, Simon fails if with Russian.
bedahr
Moderator
Posts
141
Karma
0
OS
Hi,

kgolubev wrote:I start ksimond in Konsole, set all executables for sphinxtrain (some vere missing, why?)

Which executables were missing? Are they located in your $PATH?

kgolubev wrote:I removed all configuration and data

How?

kgolubev wrote:Started with EN/H4W models and scenarios, Passed one training, then removed EN/H4W model and added Russian. Now model works OK
And, I started with EN/H4W window navigation scenario, then turned it off, removed, started new empty scenario(basic window navigation), but all sentences from EN/H4W are still there. Is it a bug or a feature?

You mean that they are still recognized, right?

That's because Simon will not remove an existing active model - only replace it with the new one as that becomes available.


kgolubev wrote:Now I have Russian model and scenario, but!
I exported scenario and model to files, removed again all configs and data. Started configuration wizard, added my scenario and model and again "could not create base model container"
It looks like something is missing. Without importing EN/H4W at the begining, Simon fails if with Russian.

I think it may have never worked - regardless of "importing EN/H4W".
Could you send me your base model and scenario, so I can take a look at it?
Please upload it somewhere (one click hoster if need be) and send the link per mail to "simon ate bedahr dot org". Thanks.

Best regards,
Peter
kgolubev
Registered Member
Posts
33
Karma
0
I had to set Speech Model Compilation
mw, map_adapt and mllr_solve were missing.
Now some more investigation.
I looked inside hub4_wsj.sbm file - there are all needed speech model files plus metadata.xml (for simon)
Then I looked inside my ru.sbm - there is another archive ru.sbm.uncompressed and all needed files lays inside ru.sbm.uncompressed
I uncompressed all data, then gzipped files to ru1.sbm archive, now files are inside archive, not inside another folder in archive.
Erased all previous settings of simon and simond, Started Simon, imported old ru.sbm to check if it will work, it didn't, again same error mesage, removed ru.sbm from Simon, tried to import again, same error.
I Imported recompressed ru1.sbm it said that model is corrupt, then I removed it and reimported ru.sbm again. focus-pocus - it's working.
Something is wrong with model importing.

Yesterday I created two simple scenarios:
Navigation - for arrow, enter and escape keys.
Windowmanager - for switching windows.
I exported them and today, after experiments with model, I imported them back. Now Windowmanager scenario is working, and Navigation not.
Simon recognises words from Navigation scenario but he says - "no applicable comand". What is wrong again? I checked and rechecked again - all comands and shortcuts are set correctly. I even removed comands and recreated them - no effect.

If you need this files to check, where can I send them? Or can you contact me directly? my mail - kostiagol at gmail
bedahr
Moderator
Posts
141
Karma
0
OS
The model you sent me per mail is definitely not built by Simon and does not follow the correct file format.

I'm guessing that the only reason why you're not always getting an error is that there is a lot of caching in the model creation (even when using a base model you're creating an active model with your vocabulary, etc.) and the model-recompilation will not always trigger. If you reach an input stage that you already had before (the result is still in the cache), you won't get another error.

When I load your model, btw., I instantly got the (correct) error from Simond: "Base model is corrupt".

However, when I re-pack the sbm with your files and import the scenario you provided, I indeed get a working recognition.

The reason why none of the commands are triggered ("no applicable command"), is because you left the default plugin trigger of "Computer" for your commands. Open the scenario, select "Commands" and then "Manage plugins" to change those.

Best regards,
Peter

Ps.: While testing all this, I noted that when the server got a corrupt model it may sometimes get stuck during synchronization. I've opened a bug and will look into that soon. I've only seen this happen with a corrupt base model, though.
kgolubev
Registered Member
Posts
33
Karma
0
It was imported from VoxForge acoustic model file with Simon ("create from model files" button and placed every file in it's place) I didn't do anything else - this sbm file was created by Simon! I didn't send you file which was recompressed by me. and I wrote about that (sorry for my English)
Thanks for (Computer), This is one of things I couldn't understand. Belive me or not, I didn't wrote this word. Where it comed from? one of Simons mysteries.

Can I post some tрoughts here?
1. You should add global keyboard shortcuts to activate/deactivate Simon. Switching microphone bi contexts is not enough.
2. Creating scenarios - why not do everything in one shot? - Enter word and phonemes and automatically add them in Training text.
3. Make Training text editable (add ability to add sentences of 2 or 3 words)
4. Make auto-hint for words I entered in adding new command dialog.
5. Clear unused commands from cash. They stay even when I remove scenario and restart computer.
6. More tutorials!

Question: How can I make one scenario activate another? I don't get it.
I want to make "Master scenario" which is called by keyword (Simon) and switches scenarios - Window manager, Type, Start program.
It must be done with contexts?

Sorry, everything in one post.
bedahr
Moderator
Posts
141
Karma
0
OS
kgolubev wrote:It was imported from VoxForge acoustic model file with Simon ("create from model files" button and placed every file in it's place) I didn't do anything else - this sbm file was created by Simon! I didn't send you file which was recompressed by me. and I wrote about that (sorry for my English)

That file included a subfolder called "rus 1.sbm" that contained all data files. Simon doesn't do that (trust me on this).
You probably sent me the wrong file.

kgolubev wrote:Thanks for (Computer), This is one of things I couldn't understand. Belive me or not, I didn't wrote this word. Where it comed from? one of Simons mysteries.

"Computer" is the default plugin trigger for some command plugins.
To be honest, I should probably change that.
Would you mind reporting a bug on bugs.kde.org suggesting that?

kgolubev wrote:1. You should add global keyboard shortcuts to activate/deactivate Simon. Switching microphone bi contexts is not enough.

We actually had that, but this feature is sadly deactivated in Simon 0.4 as it caused crashes due to KDE bug #307225.

kgolubev wrote:2. Creating scenarios - why not do everything in one shot? - Enter word and phonemes and automatically add them in Training text.

Good idea, although I'd make it an automatic training text that automatically consists of the currently allowed sentences.
Again, could you please file a bug?

kgolubev wrote:3. Make Training text editable (add ability to add sentences of 2 or 3 words)

Yep, just haven't gotten to that yet.
-> File a bug, please.

kgolubev wrote:4. Make auto-hint for words I entered in adding new command dialog.

What do you mean by that?

kgolubev wrote:5. Clear unused commands from cash. They stay even when I remove scenario and restart computer.

I also don't get that. What is an "unused command"?
After you remove a scenario the associated command can no longer be executed. If it is, you have the same command in another (remaining scenario).
If you mean that the sentence is still recognized even though you removed the scenario that contained those words / grammar my guess would be that your current configuration is an invalid one (e.g. an empty one), that doesn't trigger a model recompilation; thus, the old model will stay active.

The reason why this happens (and not the probably more intuitive choice of just failing at that point) is that by design we want to keep the recognition available for as long as possible to cater to people that use it as their primary input method.


kgolubev wrote:6. More tutorials!

Are you offering? I think you're offering. Thanks! :)

kgolubev wrote:Question: How can I make one scenario activate another? I don't get it.
I want to make "Master scenario" which is called by keyword (Simon) and switches scenarios - Window manager, Type, Start program.

One scenario can not actively activate another one. Instead, each scenario can define conditions on when it will be active.
Please tell me more about what you want to do ("When should which scenario be active?").

Best regards,
Peter
kgolubev
Registered Member
Posts
33
Karma
0
That file included a subfolder called "rus 1.sbm" that contained all data files.
Oh sh... Sorry.
But! I unpacked the real file which was made by Simon (which included rus.sbm.uncompressed subfolder) and which caused so many headache. Started as a new user, imported thees files with import model from files, and It worked. Now new user can start using this without a problem. But what caused this problem? Try to download russian model from voxforge and import as a new user, you will see.

"Computer" is the default plugin trigger for some command plugins.
To be honest, I should probably change that.
But why it worked first time? It worked until I deleted all settings and reimported scenarios.

Are you offering?
YES :D

One scenario can not actively activate another one. Instead, each scenario can define conditions on when it will be active.
Please tell me more about what you want to do ("When should which scenario be active?").
For example:
I don't want Window manager scenario to be always active, it always tries to close window or activate all windows or switch windows. How can I disactivate it? By head? Or lips? This is not the way it should be.
How I will let Simon know that I want start typing?
The Best way (as I think) There must be 3 layers of scenarios:
First level - Most important command mode - this mode can activate any command or scenario. (for advanced control) Can be started with special keyword "Simon"
Second level - switching working profiles - Window management, Typing, Working with onscreen mouse, Volume, etc. (if we talk about desktop computer). This mode can be activated and deactivated by first level, keyword or context.
Third level - All low level scenarios that can be used by any level, keyword and context.
Partly it can be done now but not everything, and there is no clear hierarchy.

Thank you for your attention :)
bedahr
Moderator
Posts
141
Karma
0
OS
kgolubev wrote:Try to download russian model from voxforge and import as a new user, you will see.

That worked for me.

Btw., there is actually no "rus.sbm.uncompressed" folder in that archive. But I also get one when opening the .sbm with Ark.
My guess why that happens: The .sbm is a gzip compressed tar archive. Because it doesn't have a ".tar.gz" extension, Ark can only go by mime type and that tells it that it's "gzip compressed data". Because gzip doesn't store a filename of the compressed data blob, Ark defaults to "<filename>.uncompressed".

You can verify that there is indeed no subfolder in the archive with the tar command line utility:
Code: Select all
bedahr@eucleia ~/tmp/t $ tar tvf rus.sbm
-rw-r--r-- bedahr/bedahr 8458240 2013-02-01 19:43 feat.params
-rw-r--r-- bedahr/bedahr 5527606 2008-02-02 17:18 mdef
-rw-r--r-- bedahr/bedahr 1439006 2008-02-02 17:18 means
-rw-r--r-- bedahr/bedahr     114 2038-01-19 04:14 metadata.xml
-rw-r--r-- bedahr/bedahr   36954 2008-02-02 17:18 mixture_weights
-rw-r--r-- bedahr/bedahr      33 2008-02-02 17:18 noisedict
-rw-r--r-- bedahr/bedahr    2506 2008-02-02 17:18 transition_matrices
-rw-r--r-- bedahr/bedahr 1439006 2008-02-02 17:18 variances


kgolubev wrote:
"Computer" is the default plugin trigger for some command plugins.
To be honest, I should probably change that.
But why it worked first time? It worked until I deleted all settings and reimported scenarios.

That would be very weird.
"Importing" and "exporting" a scenario is basically just copying the file around. There is no logic behind that and the scenario is not modified except for exploding / imploding a possible scenario hierarchy.

Are you offering?
YES :D

Awesome!
http://userbase.kde.org/Simon would probably be the best place to put them.

How I will let Simon know that I want start typing?
The Best way (as I think) There must be 3 layers of scenarios:[...]

I still don't quite understand what you want to do, to be honest.
What are the "levels" going to do?
Please describe a use-case.

Best regards,
Peter
kgolubev
Registered Member
Posts
33
Karma
0
Are you offering?
YES :D
Awesome!
http://userbase.kde.org/Simon would probably be the best place to put them.
It was a joke, man! How can I write tutorial? I'm stuck at the beginning!

If you describe me all elements in Scenario Editing Dialog, after some practising, I PROMISE to write a tutorial (in english and russian)
Can you skype me please? (I sent you my skype)
Writing messages and waiting half day for an answer is too slow. :'(
bedahr
Moderator
Posts
141
Karma
0
OS
kgolubev wrote:It was a joke, man! How can I write tutorial? I'm stuck at the beginning!

Nah, there's no joking when it comes to contributing - you're stuck now :P

Actually, a beginners tutorial written by a beginner (after you've gotten it working, of course) can be very helpful. An experienced user often doesn't even remember what was hard for him to grasp when he started out.


kgolubev wrote:If you describe me all elements in Scenario Editing Dialog, after some practising, I PROMISE to write a tutorial (in english and russian)

Have you read the handbook?

It's actually quite extensive and talks about all components, what they're here for, etc.

Best regards,
Peter


Bookmarks



Who is online

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