Re: [simon-development] Acoustic Model Switching
Brought to you by:
speechtotext
|
From: Frederik G. <gla...@kd...> - 2011-12-16 10:54:55
|
On 12/14/2011 06:40 PM, Peter Grasch wrote: > Hi Adam, > > On Tuesday 13 December 2011 19:02:01 Adam Nash wrote: <snip> >> Speaking of ContextManager - I noticed that its instance never gets >> deleted and its destructor is never called because the destructor in >> SimonControl is never called. This also means that none of the >> conditions are deleted. This is probably bad I think? :P >> I am not on good terms with the singleton gods, so I will be happy to >> take advice on how to deal with this. Well, if the singletons need to be around until the app is closed it is kind of fine. I still don't like it much since its quite confusing right now. The problem with not deleting things is usually leaks so that the application consumes more and more memory while it is running. That should not be the problem with the singletons. > If you find out, tell me about it :) > > No, seriously that's something that's already causing problems in other parts > of simon. > > Frederik suggested to look into K_GLOBAL_STATIC and it seems to provide a > means to fix that problem: > http://api.kde.org/4.x-api/kdelibs- > apidocs/kdecore/html/group__KDEMacros.html#ga75ca0c60b03dc5e4f9427263bf4043c7 > > I haven't yet looked into it properly, though. I don't think that is a good solution. It's something I tried for a bit until I realized that there are so many different singletons and such. Having two (and more) singletons depend on each other makes it super hard to untangle the mess. For a single singleton I would suggest K/Q_GLOBAL_STATIC. But that is more to make it thread safe, since the simple static variables are not and you could end up with two instances (one that never gets used). I don't think this actually happens in simon. I didn't read the code really, so this is what I remember from a month ago or so. Without thinking about it too much, I would try to reduce the singletons to one. That one would create all other objects that are singleton-like at the moment. Its sole purpose would be management of the other classes. Cheers Frederik > >>> Btw.: There seems to be a very annoying bug somewhere in the caching >>> system. If you start with a fresh installation, simon will complain >>> about not finding something in the cache. Could you please have a look? >> I will look at this. I thought that if there was no cache it just sets >> a new one up (I was pretty routinely deleting my entire cache when >> working with the context adapter). Also, I don't think I made anything >> that pops up error messages, just kDebug output. Will there be a >> difference between a new installation and an old one with just the >> context cache deleted? > There shouldn't be, I guess. > > I just dug up the concrete error message: > Could not adapt prompts. Does the file > "c:/users/<foo>/appdata/roaming/.kde/share/apps/simond/models/default/cached//acoustic > models/default/prompts" exist? > > It looks like simond tries to access a cached prompts file that doesn't exist. > That happened when using a static model (no training data). > > Does that help? > > Best regards, > Peter > > ------------------------------------------------------------------------------ > Cloud Computing - Latest Buzzword or a Glimpse of the Future? > This paper surveys cloud computing today: What are the benefits? > Why are businesses embracing it? What are its payoffs and pitfalls? > http://www.accelacomm.com/jaw/sdnl/114/51425149/ > _______________________________________________ > Speech2text-development mailing list > Spe...@li... > https://lists.sourceforge.net/lists/listinfo/speech2text-development |