Capitalize next word
Hello Everybody,
I am trying to develop some custom application with use of DNS SDK. Actually I need to be able to tell the dragon naturally speaking engine that next dictated word needs to be capitalized.
I try to use method:
HRESULT IDgnEngineControl::RecognitionMimic(DWORD dwNumWords, LPCTSTR pWords, DWORD dwSize, DWORD dwParam);
this way:
if (dgnEngineControl) {
TCHAR szBuf[ 256 ];
TCHAR *pszBuf;
_tcscpy( szBuf, _T("Cap Next") );
pszBuf = szBuf + _tcslen( szBuf ) + 1;
DWORD dwNumBytes = (BYTE *)pszBuf - (BYTE *)szBuf;
HRESULT res = dgnEngineControl->RecognitionMimic(1, szBuf, dwNumBytes, 0);
if (res < 0)
printf(_T("failed"));
}
But this does not help to get next dictated word to be capitalized.
Thank you in advance if somebody knows the correct answer.
Any suggestions will be very helpful.
From Dragon SDK C++ Help:
"
RecognitionMimic Method
Allows an application to simulate the recognition of an utterance. The recognizer tries to match the sequence of words in the utterance against the currently active grammars, including dictation, and to produce a simulated recognition. If the input does not match any active grammar, or the sequence contains a word not in the vocabulary, RecognitionMimic simulates a rejection.
The microphone state is ignored when simulating a recognition. RecognitionMimic returns as soon as the recognizer has enqueued the specified results internally. When the simulated recognition is complete, the MimicDone method is called on the client's notification sink if one was installed during Register.
Syntax
HRESULT RecognitionMimic( DWORD dwNumWords, LPCTSTR pWords, DWORD dwSize, DWORD dwParam );
Argument
Description
dwNumWords
Number of words in the sequence.
pWords
Pointer to a buffer containing the sequence of words, with each word terminated by a NULL. It is not necessary to terminate the sequence with an additional NULL. The buffer should be aligned on 4-byte boundaries and padded with NULL bytes if necessary.
dwSize
The length, in bytes, of the buffer pointed to by pWords.
dwParam
A value that can be used to identify this RecognitionMimic call. This value is passed back to the client as the dwParam argument of the MimicDone method.
"

SDK help with capitalization
First, am I correct in assuming that you are using the standalone SDK (i.e. either client or server)? If you are, you are not likely to get much help from anyone on the user forums because the users who post on this forum and those who help are generally not knowledgeable concerning the application of the SDK in creating speech enabled applications.
Second, your only option is to purchase a technical support service contract, which you should have done when you originally purchased the SDK. Only programmers familiar with the SDK can assist you with your question. I would, but I don't do that for free.
Lastly, it is possible to do what you want to do. However, you're going at it from the wrong angle. You need to perform this operation each time an utterance is detected. In addition, if you don't want to do this on every utterance, then you will have to create a separate set of conditions (true/false, 0/1) that will perform the operations under the conditions that you want it performed. I haven't worked with the current SDKs, but I do know that there should be a simple way of accomplishing this. It becomes very complex when you have separate conditions under which you want this to work.
Nevertheless, you probably need to talk to Nuance SDK support. I doubt seriously that you get any answers on this or any other standard user forum. On the other hand, if you're using the SDK as built into Dragon NaturallySpeaking, there is generally sufficient help in the advanced scripting section.
Chuck Runquist
Former DNS SDK & Senior Technical Solutions PM for DNS with Lernout & Hauspie (L&H)
If you hear the sound of hoofbeats, think horses not zebras.
Law of Parsimony (Occam's razor)
Chuck, Chuck Runquist
Chuck,
First, am I correct in assuming that you are using the standalone SDK (i.e. either client or server)?
Not sure exactly what you mean by standalone SDK. From my point of view which I know about, there is just dns sdk. (like SDK7HelpAndSamples.exe)
If you are, you are not likely to get much help from anyone on the user forums because the users who post on this forum and those who help are generally not knowledgeable concerning the application of the SDK in creating speech enabled applications.
I saw the name of the forum "SDK Programming" and description "Discuss issues with Dragon's SDK and programming for it." That is why I assume this forum should be exactly about dragon SDK programming.
Second, your only option is to purchase a technical support service contract, which you should have done when you originally purchased the SDK.
I am working on some very small project for my own. I am not sure what is the price for this support.
Only programmers familiar with the SDK can assist you with your question. I would, but I don't do that for free.
I do not understand why is this forum here, then.
If everybody who responds want some money for the answer.
What is your cost estimate for the answer?
Lastly, it is possible to do what you want to do. However, you're going at it from the wrong angle. You need to perform this operation each time an utterance is detected.
I already do this without problem.
In addition, if you don't want to do this on every utterance, then you will have to create a separate set of conditions (true/false, 0/1) that will perform the operations under the conditions that you want it performed.
I have implemented conditions already.
I haven't worked with the current SDKs, but I do know that there should be a simple way of accomplishing this.
I am absolutely sure that this is simple.
I already did some implementation but not through dragon sdk but using direct manipulation with EDIT control.
Also I am able to do it with using VoiceCommands,
the way:
dgnVMenu->Add( STARTID, str, _T("Commands"), _T(""),_T("HeardWord \"\\Cap\""), dgnactionScript);
Which works pretty well.
It becomes very complex when you have separate conditions under which you want this to work.
I need to know just this simple thing which I asked. With maybe possible one more other question: How to save and load RTF text to be supported with dragon and "Play that" for selected word. After restoring the session. So I can train.
Nevertheless, you probably need to talk to Nuance SDK support. I doubt seriously that you get any answers on this or any other standard user forum. On the other hand, if you're using the SDK as built into Dragon NaturallySpeaking, there is generally sufficient help in the advanced scripting section.
I do not know what you mean by SDK build into Dragon. Is there any other SDK?
I know that "Cap" should capitalize next word. But this does not work with RecognitionMimic method.
Petr
pavn wrote: Chuck Runquist
If you are, you are not likely to get much help from anyone on the user forums because the users who post on this forum and those who help are generally not knowledgeable concerning the application of the SDK in creating speech enabled applications.
I saw the name of the forum "SDK Programming" and description "Discuss issues with Dragon's SDK and programming for it." That is why I assume this forum should be exactly about dragon SDK programming.
I created this forum to give those using the SDK an area to share with others how to use it. It is not intended as a place to charge for answers.
But that does not mean Chuck
But that does not mean Chuck or others may not state they can only provide more detailed help if paid.
Quintijn
Charging for SDK helpSkip,
Skip,
First, I'm in a bad mood today so I apologize if I implied in any way shape or form that I would charge for help on the SDK on this or any other forum. All of the user forums are free forums and the help that is provided should be free. However, answering questions about the SDK is not something that can be done on a forum like this. The SDK is far too complex for the average user. I doubt seriously that, other than myself, there are more than two people posting on any of the forums that have sufficient knowledge of the SDK in order to provide any kind of help for pavn. Nevertheless, I wouldn't charge for any help on the Speechcomputing form. I would take it off-line and communicate directly with this person.
I appreciate your creating a sub forum for SDK programming. I'm not sure if that's an appropriate topic simply because only those who thoroughly understand the SDK and how to use it could even begin to answer these questions. The simple fact that pavn can't answer the question as to whether they are using the internal SDK embedded in DNS advanced scripting or the external SDK (standalone version) which you purchase from Nuance and which costs about $5000 for the SDK client version and about $15,000 for the SDK server version, along with a support contract which adds another $5000-$10,000 to the overall cost. My only point was that anyone who has spent this kind of money for the standalone SDK is not going to be very willing to give away information. At least I'm not.
I'm more than willing to help out in little ways in terms of pointing people in the right direction, but I simply don't have the time to train anyone or work directly with them to provide the kind of answers that pavn requires. I know where it's going and I know it can be done he just needs to get inside the SDAPI because Dragon does all of its magic within that Dragon engine specific Application Program Interface. The SDAPI contains the modified SAPI extensions that perform these types of functions. That being said, I'll leave it at that.
Nevertheless, supporting the SDK on an end-user forum isn't going to happen.
Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS
I know that you believe you understand what you think I said, but, I am not sure you realize that what you heard is not what I meant.
Sure sounds overpriced to
Sure sounds overpriced to me.
admin wrote: Sure sounds
Sure sounds overpriced to me.
Skip,
When it was my responsibility for the SDK, I had set the pricing at $800 for the developer suite, which included not only the SDK, but also included all flavors of DNS runtimes (eval copies -- not for resale runtimes).
At that point in time you could download the basic SDK for free, but you had to purchase the developer suite if you wanted to do any real development (i.e. third-party user interface versus the DNS interface). It was a marketing tool as well as a developer kit. However, any applications that you develop using it still required a runtime executable. This could be accomplished by either using a copy of DNS or purchasing runtime licenses. My understanding is that the current SDKs include a limited number of distributable runtime licenses. This is probably what has upped the cost.
I would agree that it's somewhat overpriced, but there are inclusions with the package that are probably what is creating the high cost. We distributed the developer suite with a non-distributable runtime license. That is, you couldn't create a product and sell it using the not for distribution runtime executable. Multiple licenses for the SDK runtimes is expensive and always has been. My suspicion is that they are distributing perhaps five distributable runtime licenses with the requirement that any more than five requires the purchase of additional licenses. This is where they make their money because runtime licensing generally carries a minimum upfront cost of $50,000 for X number of runtime licenses, but I don't know what $50,000 translates into in terms of the actual numbers.
Regardless, I had it simplified and the expense minimized, but inside sales never liked that because they felt that they should be making money off the SDK itself. I didn't agree, so I suspect that after I left everything was redone and made more expensive.
Also, I could be wrong on the pricing, but that was the last that I heard. I do know that the SDK server version can be expensive, but that is for different reasons because AudioMining and some other features are also included with it, which are not included with the SDK client version.
Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS
"Everything takes longer and costs more." -- Jerry Pournelle
I had a talk with a Nuance
I had a talk with a Nuance representative a while back, how it was explained to me was consistent with some of Chuck's previous posts. As I understand it the SDK is essentially a version of DNS professional. Also any product that you develop essentially includes a license to distribute a complete copy of DNS libraries/training utilities and other associated parts of DNS (+ royalty that drives the cost of the product to circa $500). To continue to distribute the application you also have to pay a (substantial) recurring annual fee (pay for support). My mind was made up that point to shelve any possibility of integrating with the product. A perfectly reasonable alternative exists in the free MS SDK. I do occasionally go back check out some the Natlink code, SAPI 4 spec, search the net, and contemplate diving in but the cost/benefit/risk is simply not reasonable. I feel its really a shame that progress (and dominance) of their product is held back by thickheaded greed ($800 seems a little more palatable). It leaves the door open for someone with more reasonable terms to service the needs of small projects like mine.
I was still a little unclear on a few points after the conversation and never got an answer back, notably,
1) Can you just implement against the SAPI 4 specification and have functional application that runs when a copy of DNS Preferred/professional is already installed.
2) Was there any type of 'module' license i.e. a product that was developed against the SDK, but dynamically links against a running DNS (keeping the cost down below $500).
Nathaniel
Chuck, do not know where you
Chuck,
do not know where you get that amount of money. As I know that DNS SDK can be downloaded for free from the nuance website.
The only problem with DNS SDK API chm help file is that it is not created properly by either by intend or by poor programming quality. And it is poorly documented.
And I am pretty sure that it is possible create DNS API better way than currently it is.
Also if they want to get more products to sell, because of possible integration dns to other products, they need to provide proper documentation to users.
pavn wrote: Chuck, do not
Chuck,
do not know where you get that amount of money. As I know that DNS SDK can be downloaded for free from the nuance website.
The only problem with DNS SDK API chm help file is that it is not created properly by either by intend or by poor programming quality. And it is poorly documented.
And I am pretty sure that it is possible create DNS API better way than currently it is.
Also if they want to get more products to sell, because of possible integration dns to other products, they need to provide proper documentation to users.
pavn,
If you can find a free download of the SDK on the nuance website I would be very surprised. The last free download that was available to end-users was I believe the DNS SDK 7,, possibly 8. I don't believe you can get a free copy of just the basic SDK for versions 9 and 10 because a lot has changed and changed dramatically.
If what you have is one of the older versions of the SDK and help files, it's no wonder that you're confused and having problems, and that the documentation looks shoddy. It is, but it's not the current version and I have been led to understand that the documentation in the paid version is much better. In addition, the DNS API that you're looking at is really no longer valid if you're working with what I think you are. What you're looking at is the documentation that was written when I was SDK program/project manager at L&H and that doesn't contain very useful information nor is it anywhere near complete. Those SDK downloads were ticklers.
Nevertheless, if you can find a free download of DNS SDK 9 or 10, let me know. I'd love to see it. However, I don't think there's a free copy available anymore from any source. Except someone willing to give it away, which I doubt would happen.
Chuck Runquist
Former Dragon NaturallySpeaking SDK & Senior Technical Solutions PM for DNS for Lernout & Hauspie (L&H)
If computers get too powerful, we can organize them into a committee - that will do them in. - Bradley's Bromide