473,395 Members | 1,936 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,395 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 1373

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.