473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SAPI Grammar C++ Problem

I dont know if this is the right place to ask so sorry if not but i have a
problem trying to use SAPI and wondered if anyone could help.

I can connect to all the COM components fine and I can get a callback
working in dictation mode but i cant load a grammar... when i use

hr = g_cpCmdGrammar->LoadCmdFromResource(NULL,
MAKEINTRESOURCEW(IDR_CMD_CFG),L"SRGRAMMAR", MAKELANGID(LANG_NEUTRAL,
SUBLANG_NEUTRAL),SPLO_DYNAMIC);

and try to load the compiled XML grammar file from the resource file I get
and HRESULT of "The specified resource type cannot be found in the image file"

when i use

hr = g_cpCmdGrammar->LoadCmdFromFile(L"c:\grammar.cfg", SPLO_STATIC);

To load it from disk (i know its there!) I get a HRESULT of "The specified
file cannot be found"

Doh!
Jul 21 '05 #1
0 1372

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AndyNY | last post by:
I am trying to write a dll in C# using SAPI 5.1 SDK. The DLL is supposed to take in a prerecorded WAV file and provide both the recognized text and a wav file created from Text to speech on the...
0
by: Bob | last post by:
I have a C# windows application that uses SAPI 5.1 speech recognition. I would like to use dynamic grammars but am having trouble finding the right command syntax and method parameters to use for...
1
by: New Devil | last post by:
hi how can i use SAPI with TAPI in C# ... give me any idea how to make a simple program to use SAPI with TAPI in C# ........... Best Regards ibrahim@islamabad.net Ibrahim Zaman Posted Via...
0
by: wackyphill | last post by:
I'd like the engine to look for a rule match for a # for example using my number grammar/context before it tries to use the dictation grammar/context to find a rule match. Is there a way to...
0
by: RoboCity | last post by:
I dont know if this is the right place to ask so sorry if not but i have a problem trying to use SAPI and wondered if anyone could help. I can connect to all the COM components fine and I can get...
0
by: celine langlois | last post by:
Hello, This my code in asp : <% set spvoice = server.createobject("SAPI.SpVoice") set spfilestream = server.createobject("SAPI.SpFileStream") rem spfilestream .Format.Type = 6
0
by: matetelki | last post by:
Hi! As I've found tons of VB and C# sample codes, I was trying to transform it into PHP code, using the COM objects. My aim is to create a simple html, that creates a wav from a text. Here's...
1
by: weheh | last post by:
I'm running Python 2.3 and calling pyTTS. I've had it working forever. Today, I ran out of disk space. After deleting some of my personal files, for no apparent reason, pyTTS no longer runs. ...
1
by: tomfox | last post by:
Hi there, is there any tutorial on voice recognition in C# that explains the basic steps to create a simple VR application MSDN has some good tutorials unfortunately in C++. The only sample I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.