| Author | Posts |
|---|---|
| Author | Posts |
| May 10, 2011 at 1:21 pm #4033 | |
|
akaniklaus |
Newer version of CMUSphinx is recently released as you probably know already, I have not tried yet to using your library just by replacing them from CMULibraries folder but I would really be happy if you can update OpenEars once you have done it. Thank you very much for providing such nice library that ease our work… |
| May 10, 2011 at 1:32 pm #4034 | |
|
Halle |
Hi akaniklaus, I sympathize with wanting the latest and greatest, but that isn’t on the to-do list at the moment. I checked through .7 at the end of last week to consider whether it would be good to roll into the upcoming update, but the changes aren’t high-impact for the majority of OpenEars users, I don’t think there has been much feedback yet on new bugs in .7, and it looked to me like there were some API changes in areas that OpenEars makes use of, so it would be a lot of work to re-port and refactor and it would probably introduce some support confusion for unclear return. I’ll take a look at it again in a few months when OpenEars’ upcoming update features seem stable and when there has been more feedback on .7, so the questions of upgrading Pocketsphinx and Sphinxbase can be addressed by themselves. |
| May 10, 2011 at 1:45 pm #4035 | |
|
akaniklaus |
Dear Halle, Thank you for your consideration. Actually, I need to use OpenEars with a larger vocabulary (almost 5k) and they have claimed that the new version dramatically works faster on large vocabularies. I have tried WSJ 5K vocabulary using Sphinx Knowledge Base Tool as you have recommended. However, the program immediately crashes after I speak something, receiving EXC_BAD_ACCESS signal at the IF statement within the following line of ps_start_utt function. if (ps->search == NULL) { Have you ever experimented with a larger vocabulary? or do you have any idea how can I resolve the problem. Note: Sorry, if it is inappropriate not opening a separate thread for this question. I also have not tried yet your logging function, I can try to give more details by logging if you can not give an immediate answer. Note 2: I do not think that I have opened MDEF file but I will try to re-install the project anyway. (Note 3: I have just tried after installing everything again but I am still getting the same error.) |
| May 10, 2011 at 2:18 pm #4036 | |
|
Halle |
It is faster with large JSGF grammars, but your grammar is an ARPA grammar, as is the case for all but a few OpenEars users. Generally, OpenEars has more limited support for JSGF than ARPA so it would be a misguided priority to put a lot of production time into .7 to support improved JSGF searches only, when there are more basic JSGF features that aren’t present in the library that probably result in most users choosing to go with ARPA grammars. I’m unclear on what you mean here:
My understanding is that the WSJ 5K vocabulary is an already-existing grammar, so I don’t immediately follow what you did with it with the language tool. Can you show me a link to what you are using when you say WSJ 5K vocabulary? You should definitely turn on logging for your own troubleshooting even before showing me the logs. |
| May 10, 2011 at 3:23 pm #4037 | |
|
akaniklaus |
Dear Halle, I have created a language model with 5,000 words from WSJ dictionary, using CMU Language Tool (http://www.speech.cs.cmu.edu/tools/lmtool.html). You may download the language model that I have created from this url: http://goo.gl/C6FKY Actually, there was an already existing 5k language model at .DMP format within VocalKit, which I could not figure out how to use with OpenEars. I am now trying with logging functionality as well to see if I can catch a proper explanation for both of us. |
| May 10, 2011 at 3:44 pm #4038 | |
|
Halle |
OK, I understand now. What steps did you do in order to try to use the VocalKit model? And are we talking about your own app or the sample app here? |
| May 10, 2011 at 3:50 pm #4039 | |
|
akaniklaus |
Thank you very much, you are amazingly helpful. This seems to be problem but I do not know why the languagemodel is not found: ERROR: “ngram_model_arpa.c”, line 465: File /var/mobile/Applications/FAF4CCE8-21FF-47EF-800F-8F65D7C467CC/OpenEarsSampleProject.app/7224.languagemodel not found I am just modifying your sample app for now. I have not tried VocalKit model because it was in .DMP format, as I said before. I have put .languagemodel and .dic file generated using CMU Language Tool to the Language Model dictionary under Classes. Then, I have modified kLanguageModelName and kDictionaryName for the new values. |
| May 10, 2011 at 4:00 pm #4040 | |
|
akaniklaus |
Hello again, I have deleted and re-added those files and now it is working but with a very low accuracy (lower than what I got using VocalKit). Can you recommend me any good language model having approximately 5K vocabulary? Thank you SO MUCH for your help and especially for your time. |
| May 10, 2011 at 4:07 pm #4041 | |
|
Halle |
Try the following files from the OpenEars + Pocketsphinx distribution that should be a good match for the default acoustic model: OpenEars/CMULibraries/pocketsphinx-0.6.1/model/lm/en_US/hub4.5000.DMP You can always use a .DMP file in place of a .languagemodel file and for large grammars it’s obligatory. BTW, trying to recognize a complete vocabulary with the iPhone is going to be a memory and CPU time hog, but you probably already know that. |
| May 10, 2011 at 4:28 pm #4042 | |
|
Halle |
No, I take that back, use the .DMP file from your OpenEars folder, but use the .dic file here: |
| May 14, 2011 at 7:31 am #4043 | |
|
edgecase |
FWIW, I’m also mainly interested in OpenEars for the JSGF support, I expect I’m not the only one – it’s not necessarily a very small number. In fact given the performance available on older iPhones at least, most would probably have to use grammars just because a more open model just means more options, and doesn’t seem feasible the performance is enough of a challenge with JSGFs. (Or am I misjudging and it would actually be faster the other way? Please let me know if not – but as far as restricting syntax of allowable commands, building a grammar works just fine for me.) I’m interested enough in the supposedly faster 0.7 JSGF performance to have started looking over it and the difficulty of porting it myself for OpenEars (not looking easy, I agree), or trying VocalKit, or just using it directly – except I’m much better with ObjC interfaces than C ones. One thing that concerns me is that something I saw (I forget where) about pocketsphinx that suggested that the compilation of JSGF grammars might be much faster in 0.7 – which implies that could be the speedup, and that recognition might not be much faster. Any thoughts on an ETA for 0.7 support, or tips on how I might go about patching it in myself if I get to that point? I’m not eager to do that, but I’m sure it’d be faster to try to upgrade OpenEars than to start from pocketsphinx and flite myself, and basically have to rewrite OpenEars.. Thanks in advance for any help you have time to give. I’m very thankful for OpenEars, and especially your excellent documentation – it got me up and running in a matter of hours. |
| May 14, 2011 at 9:52 am #4044 | |
|
Halle |
Hello, I completely understand the desire for .7 and I know that there are JSGF users, but resources for OpenEars are fixed at a limited size and over 90% of all users who I’ve had direct interaction with are ARPA users, so there has to be feature triage somewhere or else there is either a decrease in library quality, or a decrease in support, or both, depending on what form the unanticipated consequences take. Like both of you I checked out .7 immediately in the hopes that it would be trivial to port because I also want to use the most recent version, but based on browsing it I concluded that it probably wouldn’t be trivial (I don’t know that for sure without having seriously attempted it) and it probably wouldn’t change performance for most users (I also don’t know that for sure without having completed porting it), so I chose to not let it complicate the following features that are currently in testing for the next version: * Audio unit driver for practically no driver latency while listening and increased mic gain, .7 arrived in the middle of the testing cycle for these features and it would be a little crazy to also drop a new Pocketsphinx and Sphinxbase library in there for kicks ;) . Which means no ETA for .7 because it isn’t even on the list right now and to the extent that there has ever been a roadmap, it just said “add dynamic grammar generation and switching”. I’ll re-open the question once the next version of OpenEars has shipped and it’s known to be stable, and I have another block of time for an update, none of which I have insight into the timing on other than the next version shipping, which is something like days or weeks. I have no advice on doing your own port of .7 but it’s a good case for using CMU’s own iPhone compiler script and linking VocalKit to it, since VocalKit is designed to use a compiled Pocketsphinx library. All that said, don’t stop telling me about features you’d like, since I’m not tuning it out and it’s a reasonable request, and when I get a solid block of update time, I re-read the forum discussions to remind myself of what’s been requested so I can investigate what would be involved in adding it. At some point it will probably be necessary to go to .7 no matter what, because I also have to get support from the Sphinx project for my questions and it isn’t particularly neighborly to keep requesting support for an old version, but my preference is to let both .7 and the next version of OpenEars get a lot more use first. |
| May 14, 2011 at 10:37 am #4045 | |
|
Halle |
A couple of your comments that I missed:
I haven’t tested JSGF versus ARPA for a similarly-sized grammar so I don’t know which is faster on any given iPhone model, but they are both equally open. For one you need to write correct markup and for the other you need to have a fast-yet-memory-frugal word probability calculator. But making either of those processes self-evidently simple, reliable and fast via an API designed to be used by developers with different experience levels is not overtly easy.
My reading of the release notes for Pocketsphinx .7 based on having spent a fair amount of time with the Pocketsphinx JSGF code was that recognition for large JSGF grammars that already exist would be faster. |
| August 10, 2011 at 11:42 pm #7472 | |
|
edgecase |
Hi Again, I don’t mean to push, but I was curious since it’s been some time – any thoughts on when 0.7 might be integrated? I like the changes you’ve been making since mid-May, but the faster JSGF support would still be very nice to have. |
| August 22, 2011 at 8:05 pm #7494 | |
|
Joseph S. Wisniewski |
Edgecase, it’s coming. Whether I fork Pocketsphinx 0.6.1 so Halle doesn’t have to try upgrading to 0.7, or whether we can coax him up to 0.7, it’s coming. Halle, I have tested FSG vs. LM for similar sized applications. FSG, when done right, is much, much better. And FSG grammar runs when the lmtool LMs, with too much emphasis on 1 and 2 grams, fall down flat. I’m not sure if the ngram support for LMs could be improved within the Sphinx framework. But the Pocketsphinx wasn’t behaving the way I expected. There is no way a low perplexity FSG, run by a user staying within the FSG, should ever be beat by an LM built for a simple command and control grammar. But the FSG was running slower and less accurately than the LM. I got the same sort of weirdness that people were talking about in this thread… http://www.politepix.com/forums/topic/how-to-use-jsgf/ So, I set out to find out why. There’s a couple of interesting things I’ve learned along the way. The most important is that Pocketsphinx JSFG support in version 0.6 and 0.7 is broken. It’s apparently been broken a lot longer than three years (0.6). The broken part is the JSGF to FSG engine that is used both inside pocketsphinx_continuous (the core of OpenEars) and in the standalone Sphinx_JSGF2FSG tool in the Pocketsphinx distribution. Something important is literally missing, so it never could really have worked right. I’ll have a fix soon, I think, but in the meantime, I’ve made a minor change to OpenEars so I can use FSG grammars built on a tool other than CMU’s stuff. The results are like night and day. The FSG version returns quickly and much more accurately than the LM, now. So, I conclude that any reports of LMs outperforming FSGs in small, containable applications are purely a side-effect of the broken JSGF support. I’m currently working on an extremely hostile environment iOS recognition application. The task is well suited for good old FSG grammars, it breaks down into habitable grammars and we have a cooperative user pool. The other thing I learned is that enabling FSG model switching isn’t anywhere near as complicated it sounds. ;)
|
| August 22, 2011 at 11:34 pm #7498 | |
|
edgecase |
Joseph, thanks so much for sharing your results.. any chance you’d be willing to share your ‘minor change’ and which tool you used also? I’m curious if it might help with my current issue, which I’d hope to solve by switching to 0.7 – but I’m not sure now, I am very curious about which part is broken.. This is a bit off-topic, but it’s a lot of my motivation for wanting to go to 0.7, so I’ll explain. I have a very complex JSGF grammar, still in development. It recognizes fast enough once loaded, but it takes fourteen and a half minutes to load, on an iPad2. Obviously this needs to be an order of magnitude or two faster for the real app.. I have had other versions of my grammar with similar functionality up and running in under 20 seconds. As I said, it’s in development. But. What it’s doing in that time is computing – it doesn’t crash, it doesn’t run out of memory, and it works great when it’s done. So ideally I’d like to precompute that part. If I’m very lucky, those fourteen minutes are spent converting to an FSG in memory. I’m wondering if passing a pre-converted FSG instead of a JSGF might speed things up, could you (or anyone reading this) give your opinion on if that would work? In case it helps to answer, it spends most of that processing time in fsg_model.c, in the function fsg_model_null_trans_closure(), between lines 177 and 228. I can tell because those lines are bracketed by diagnostic statements:
if (nulls == NULL) { for (i = 0; i n_state; ++i) { /* for (gn1 = nulls; gn1; gn1 = gnode_next(gn1)) { E_INFO("%d null transitions added\n", n); Any ideas?
|
| August 23, 2011 at 12:21 am #7500 | |
|
edgecase |
Also I’d be very interested to hear how you managed to achieve FSG switching, that would allow me to reduce the size of my grammar by quite a bit by splitting the user interaction into modes and switching instead of collating and ignoring what isn’t applicable. |
| August 24, 2011 at 10:13 am #7505 | |
|
Halle |
Hi guys (I’m not one as it happens), I am a bit swamped at the moment and this is a slightly complicated thing which is why I haven’t responded yet (but I am very interested in the Pocketsphinx JSGF processing discoveries).
This is a tiny bit confusing to me because I offered to let you test JSGF switching code a few months ago when we corresponded but you didn’t take me up on it, and lack of testing feedback due to few OpenEars developers using JSGF is the main reason that JSGF-switching code hasn’t been slated for recent versions. As Joseph mentioned, it isn’t complex (although the documentation makes it a little opaque), but it is a QA issue because it heavily branches the amount of hands-on testing that is needed, and initial results when I added this code were a little peculiar. This is also the main concern behind changing Pocketsphinx versions; 0.6.1 is very stable and so is OpenEars at the moment, and there are fewer developers who are engaged enough with speech per se to go the JSGF route (many of them write very good questions here, but as the person with the highest-level overview on the userbase I can tell you that it is a minority — not only is it easier to use LanguageModelGenerator but the advice from the Sphinx project is almost always to push towards ARPA models because they seem to be into moving towards dictation as the main goal). So the question about upgrading the library isn’t just “how can we make JSGF as good as possible” but also “what will the effects on the rest of the developers be when we drop a new library into this thing” and “what will be the effect on QA and documentation and support if we attempt to support two Pocketsphinx versions at the same time as supporting two types of language model/grammar and two types of switching, or alternately one Pocketsphinx version of unknown road-tested-ness rather than one that we know is pretty settled down”. My impression is that there are some serious refactors in .7, which is great, but you can also understand why I would be slow to adopt when things are otherwise in good shape on this end. However, I’m up for discussing it further and it sounds like Joseph has some options to offer. Certainly it isn’t a goal of mine for OpenEars to have slow or bad JSGF recognition. |
| August 24, 2011 at 11:35 am #7507 | |
|
vthinkingstudio |
I manually update to .7 and I did not find obvious improvement on accuracy. So I rolled back to 0.61. I agreed with Halle about upgrade policy. |
| August 24, 2011 at 10:45 pm #7512 | |
|
Joseph S. Wisniewski |
edgecase, you’re running into something related the problems I’m working around. The Sphinx JSGF component generates insane amounts of null transitions. And Sphinx itself doesn’t deal will with null transitions. That O(n^2) algorithm is just the tip of the iceberg. The bigger problem is that it’s quite common for an FSG that has a lot of null arc feeding null arc feeding null arc to totally blow the search. Those things can generate thousands of degenerate hypotheses and drive more valid hypotheses out of the search space. And the Sphinx JSGF component generates a huge number of null arcs. I’ve got one JSGF in my own project that Sphinx turns into 140 nodes with 224 transitions, 180 of them being nulls, and it essentially doesn’t work. The optimized version is 21 nodes, 60 transitions, with only 7 null arcs. No solution, yet. |
| August 25, 2011 at 6:17 pm #7521 | |
|
Halle |
Hi, OK, I am taking moving to .7 under advisement for a future release if I get enough testing feedback from this post (if I don’t get feedback, or if the feedback is that it doesn’t affect anything, I’m going to assume that it doesn’t make sense to add it). Here are instructions you can follow to use .7 right now. I am also repeating my offer of letting you test out an early iteration of JSGF-switching code. It’s attached after the .7 install instructions. These steps are for configuring a brand-new install. You will follow the regular Getting Started install instructions exactly, but you will download pocketsphinx-0.7.tar.gz and sphinxbase-0.7.tar.gz instead of pocketsphinx-0.6.1.tar.gz and sphinxbase-0.6.1.tar.gz, and before you perform any of the installation steps you will make the following changes to the files in the OpenEars.zip download distribution. 1. Open up InstallOpenEars.pl in a text editor and replace every occurence of the text string -0.6.1 with -0.7 2. Still in InstallOpenEars.pl, find this code block and remove it entirely:
my $ms_gaudenfilename = 'pocketsphinx-0.6.1/src/libpocketsphinx/ms_gauden.c';
my $ms_gaudenfind1 = 'for \(i = 0\; i \< n_feat\; i\+\+\)';
my $ms_gaudenreplace1 = 'for (i = 0; i < n_feat; i++) {';
my $ms_gaudenfind2 = 'printf\(\" \%dx\%d\", n_density, veclen\[i\]\)\;';
my $ms_gaudenreplace2 = <<"GAUDENTOKEN";
// printf(" %dx%d", n_density, veclen[i]);
}
GAUDENTOKEN
;
local @ARGV = ($ms_gaudenfilename);
local $^I = '.bak';
while( <> ){
s/$ms_gaudenfind1/$ms_gaudenreplace1/ig;
s/$ms_gaudenfind2/$ms_gaudenreplace2/ig;
print;
};
3. Right-click on [OPENEARS]/OpenEarsLibrary/OpenEarsLibrary.xcodeproj and select Show Package Contents. In a text editor, open up the file project.pbxproj within and make the following changes: Change the two lines which read: "../CMULibraries/sphinxbase-0.6.1/include", to instead read: "../CMULibraries/sphinxbase-0.7/include/**", and then replace every occurence of the string -0.6.1 with the string -0.7 4. Right-click on [OPENEARS]/OpenEarsSampleProject/OpenEarsSampleProject.xcodeproj and select Show Package Contents. In a text editor, open up the file project.pbxproj within and make the following changes: Change the two lines which read: "../CMULibraries/sphinxbase-0.6.1/include", to instead read: "../CMULibraries/sphinxbase-0.7/include/**", and then replace every occurence of the string -0.6.1 with the string -0.7 This will let you continue with the normal installation steps but end up with a .7 install. To test out the JSGF-switching code, make the following changes to ContinuousModel.mm: Replace the entire contents of the method - (void) changeLanguageModelForDecoder:(ps_decoder_t *)pocketsphinxDecoder languageModelIsJSGF:(BOOL)languageModelIsJSGF with the following code:
- (void) changeLanguageModelForDecoder:(ps_decoder_t *)pocketsphinxDecoder languageModelIsJSGF:(BOOL)languageModelIsJSGF {
if(languageModelIsJSGF == TRUE) {
NSArray *dictionaryArray = [[NSString stringWithContentsOfFile:self.dictionaryFileToChangeTo encoding:NSUTF8StringEncoding error:nil] componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]];
int updateValue = 0;
int count = 0;
int add_word_result = 0;
for(NSString *string in dictionaryArray) {
NSArray *lineArray = [string componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
NSMutableString *mutablePhonesString = [[NSMutableString alloc] init];
int i;
for ( i = 0; i < [lineArray count]; i++ ) {
if(i > 0) [mutablePhonesString appendString:[NSString stringWithFormat:@"%@ ",[lineArray objectAtIndex:i]]];
}
NSRange deletionRange = {[mutablePhonesString length]-1,1};
[mutablePhonesString deleteCharactersInRange:deletionRange];
if(count < [dictionaryArray count]) {
updateValue = 0;
} else {
updateValue = 1;
}
add_word_result = ps_add_word(pocketsphinxDecoder,(char *)[[lineArray objectAtIndex:0] UTF8String], (char *)[[lineArray objectAtIndex:1] UTF8String],updateValue);
[mutablePhonesString release];
if(add_word_result > -1) {
OpenEarsLog(@"%@ was added to dictionary",[lineArray objectAtIndex:0]);
} else {
OpenEarsLog(@"%@ was not added to dictionary, perhaps because it is already in the dictionary",[lineArray objectAtIndex:0]);
}
count++;
}
OpenEarsLog(@"A request has been made to change a JSGF grammar on the fly.");
fsg_set_t *fsgs = ps_get_fsgset(pocketsphinxDecoder);
jsgf_t *jsgf;
fsg_model_t *fsg;
jsgf_rule_t *rule;
char const *path = (char *)[self.languageModelFileToChangeTo UTF8String];
if ((jsgf = jsgf_parse_file(path, NULL)) == NULL) {
OpenEarsLog(@"Error: no JSGF file at path.");
}
rule = NULL;
jsgf_rule_iter_t *itor;
for (itor = jsgf_rule_iter(jsgf); itor;
itor = jsgf_rule_iter_next(itor)) {
rule = jsgf_rule_iter_rule(itor);
if (jsgf_rule_public(rule))
break;
if (rule == NULL) {
OpenEarsLog(@"Error: No public rules found in %s", path);
}
}
fsg = jsgf_build_fsg(jsgf, rule, pocketsphinxDecoder->lmath, fsgs->lw);
if (fsg_set_add(fsgs, fsg_model_name(fsg), fsg) != fsg) {
OpenEarsLog(@"Error: could not add finite state grammar to set.");
} else {
}
if (fsg_set_select(fsgs, fsg_model_name(fsg)) == NULL) {
OpenEarsLog(@"Error: could not select new grammar.");
}
ps_update_fsgset(pocketsphinxDecoder);
} else {
OpenEarsLog(@"A request has been made to change an ARPA grammar on the fly. The language model to change to is %@", self.languageModelFileToChangeTo);
NSNumber *languageModelID = [NSNumber numberWithInt:999];
NSFileManager *fileManager = [[NSFileManager alloc] init];
NSError *error = nil;
NSDictionary *fileAttributes = [fileManager attributesOfItemAtPath:self.languageModelFileToChangeTo error:&error];
if(error) {
OpenEarsLog(@"Error: couldn't get attributes of language model file.");
} else {
OpenEarsLog(@"In this session, the requested language model will be known to Pocketsphinx as id %@.",[fileAttributes valueForKey:NSFileSystemFileNumber]);
languageModelID = [fileAttributes valueForKey:NSFileSystemFileNumber];
}
[fileManager release];
ngram_model_t *baseLanguageModel, *newLanguageModelToAdd;
newLanguageModelToAdd = ngram_model_read(pocketsphinxDecoder->config, (char *)[self.languageModelFileToChangeTo UTF8String], NGRAM_AUTO, pocketsphinxDecoder->lmath);
baseLanguageModel = ps_get_lmset(pocketsphinxDecoder);
OpenEarsLog(@"languageModelID is %s",(char *)[[languageModelID stringValue] UTF8String]);
ngram_model_set_add(baseLanguageModel, newLanguageModelToAdd, (char *)[[languageModelID stringValue] UTF8String], 1.0, TRUE);
ngram_model_set_select(baseLanguageModel, (char *)[[languageModelID stringValue] UTF8String]);
ps_update_lmset(pocketsphinxDecoder, baseLanguageModel);
int loadingDictionaryResult = ps_load_dict(pocketsphinxDecoder, (char *)[self.dictionaryFileToChangeTo UTF8String],NULL, NULL);
if(loadingDictionaryResult > -1) {
OpenEarsLog(@"Success loading the dictionary file %@.",self.dictionaryFileToChangeTo);
} else {
OpenEarsLog(@"Error: could not load the specified dictionary file.");
}
NSDictionary *userInfoDictionary = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"PocketsphinxDidChangeLanguageModel",self.languageModelFileToChangeTo, self.dictionaryFileToChangeTo,nil] forKeys:[NSArray arrayWithObjects:@"OpenEarsNotificationType",@"LanguageModelFilePath",@"DictionaryFilePath",nil]];
NSNotification *notification = [NSNotification notificationWithName:@"OpenEarsNotification" object:nil userInfo:userInfoDictionary];
[[NSNotificationCenter defaultCenter] performSelectorOnMainThread:@selector(postNotification:) withObject:notification waitUntilDone:NO];
self.languageModelFileToChangeTo = nil;
self.thereIsALanguageModelChangeRequest = FALSE;
OpenEarsLog(@"Changed language model. Project has these words in its dictionary:\n%@", [self compileKnownWordsFromFileAtPath:self.dictionaryFileToChangeTo]);
}
}
And replace the following lines:
if(languageModelIsJSGF == FALSE) {
[self changeLanguageModelForDecoder:pocketSphinxDecoder languageModelIsJSGF:languageModelIsJSGF];
} else {
OpenEarsLog(@"Sorry, switching JSGF grammars on the fly isn't supported in this version of OpenEars. You can dynamically generate and switch ARPA grammars.");
}
So that they are as follows:
//if(languageModelIsJSGF == FALSE) {
[self changeLanguageModelForDecoder:pocketSphinxDecoder languageModelIsJSGF:languageModelIsJSGF];
//} else {
// OpenEarsLog(@"Sorry, switching JSGF grammars on the fly isn't supported in this version of OpenEars. You can dynamically generate and switch ARPA grammars.");
//}
|
| August 25, 2011 at 7:55 pm #7524 | |
|
edgecase |
Hi Halle, thanks for posting that! I’m excited to try both the switching and 0.7 engines, though I am so close on my current app I may do that as a boost to the next revision, especially after spending the last two days revising my grammar and tweaking parameters to fix the startup speed issue. I guess I had missed it if you had previously posted instructions or an invitation to ask you for instructions, I apologize if I seemed non-responsive, but I am definitely interested, and have a lot of data on JSGF performance in OpenEars 9.12 I’ve collected over the past two days of optimizing – my grammar is a much more capable in some ways and a bit less capable in others, but it’s starting in 18 seconds now. Recognition speed has been pretty good, staying within a ratio of 0.8 to 2.0 times speech duration (including the silence in the duration), typically about 1.2x. I had some surprising results, along the lines of higher level primitives with more options actually performing better than using subsets of their content. I can’t post the actual grammar here, but if you’d like I can share over email in confidence. Btw – Joseph – I wasn’t sure what you meant about the null transitions not being necessary, but on a hopeful whim I gave it a shot and commented out the code I’d quoted, and it does result in recognition errors with more complex phrases, as you might expect if it were necessary. Finally, though I haven’t tried your code yet, I want to give my feedback that in my opinion it does make sense to add it, if for no other reason than that it’s where pocketsphinx is going and from their forums I get a sense that many have gotten good use out of it. I also like being able to read that a bug has been fixed in their forums (there is one directly relating to the code I quoted, dated in may of this year, but I’m not sure if the fix was included in 0.6.1 – I’m pretty sure it’s in 0.7.) Thanks again, I can’t wait to try out these new toys. |
| September 8, 2011 at 4:12 pm #7588 | |
|
Joseph S. Wisniewski |
I’m still working on my fix for the Sphinx JSGF bug. Because Sphinx generates such bad FSGs from JSGFs (either using the command-line tool on the JSGF then loading the FSG in Sphinx like I do, or telling Sphinx to load a JSGF, like Halle does in OpenEars) the advantages of 0.7 are largely masked. |
| October 11, 2011 at 5:49 am #7674 | |
|
edgecase |
Joseph (or anyone else who might know), if you see this, would you mind explaining how you use a command line tool (and which tool) to pre-process a JSGF to a sphinx-loadable FSG? I’ve looked around a bit but haven’t figured it out yet, it would be a huge performance win. Thanks.
|
You must be logged in to reply to this topic.

OpenEars
Our Flying Friends