<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Quote:Gregory M. wrote: in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117676#M74760</link>
    <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gregory M. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Neil,&lt;/P&gt;

&lt;P&gt;this never really got resolved. &amp;nbsp;We could not get the files to work based on the sample. &amp;nbsp;We (by the way, we as &amp;nbsp;a team, not me myself and I!) ended up using a super basic file:&lt;/P&gt;

&lt;P&gt;&amp;lt;example snipped&amp;gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Gregory&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Gregory,&lt;/P&gt;

&lt;P&gt;I think I may have just solved it -- the path name passed in needs to be of type "wchar" (literal L"pathname"), not char*. The examples show pxcCHAR type being used which, despite its name, is synonymous with wchar_t . BTW, thanks for your quick reply to my earlier post.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2016 15:09:00 GMT</pubDate>
    <dc:creator>Neil_F_1</dc:creator>
    <dc:date>2016-11-10T15:09:00Z</dc:date>
    <item>
      <title>BuildGrammarFromFile incorrect GID</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117668#M74752</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Good morning;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I'm trying to load a Grammar file for voice rec but keep on getting the following error&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;BuildGrammarFromFile&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Incorrect GID&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;In the code below I've tried setting different int value just for kicks but same result:&lt;BR /&gt;
	As to the grammar file name, does it have to be in a specific format (with or without extension) and where should you locate the file?&lt;/P&gt;

&lt;P&gt;Thank you&lt;BR /&gt;
	Gregory&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;bool SetGrammarFromFile(String GrammarFilename)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int grammar = 111;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pxcmStatus sts = sr.BuildGrammarFromFile(grammar, PXCMSpeechRecognition.GrammarFileType.GFT_JSGF, GrammarFilename);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sts &amp;lt; pxcmStatus.PXCM_STATUS_NO_ERROR)&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; form.PrintStatus("Grammar Compile Errors:");&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; form.PrintStatus(sr.GetGrammarCompileErrors(grammar));&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sts = sr.SetGrammar(grammar);&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (sts &amp;lt; pxcmStatus.PXCM_STATUS_NO_ERROR) return false;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2016 14:27:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117668#M74752</guid>
      <dc:creator>GMenv1</dc:creator>
      <dc:date>2016-03-19T14:27:27Z</dc:date>
    </item>
    <item>
      <title>You can find this usage in</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117669#M74753</link>
      <description>&lt;P&gt;You can find this usage in our SDK sample app @C:\Program Files (x86)\Intel\RSSDK\sample\DF_SpeechRecognition. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 22:02:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117669#M74753</guid>
      <dc:creator>Xusheng_L_Intel</dc:creator>
      <dc:date>2016-03-22T22:02:34Z</dc:date>
    </item>
    <item>
      <title>David,</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117670#M74754</link>
      <description>&lt;P&gt;David,&lt;/P&gt;

&lt;P&gt;The code comes from the example. Actually in the example,&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;GrammarFileType.GFT_JSGF is not set to a JSGF&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;And the question about the GID and how it relates to the file/setup/declaration remains.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Thank you&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Gregory&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 18:31:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117670#M74754</guid>
      <dc:creator>GMenv1</dc:creator>
      <dc:date>2016-03-23T18:31:16Z</dc:date>
    </item>
    <item>
      <title>I can’t reproduce the error.</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117671#M74755</link>
      <description>&lt;P&gt;I can’t reproduce the error. &amp;nbsp;I used sample source code and suggested grammar file type PXCSpeechRecognition::GFT_JSGF.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Grammar file was used from sample folder C:\Program Files (x86)\Intel\RSSDK\sample\DF_SpeechRecognition\examples\cncexample.jsgf.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;grammarFile input argument is full path to the file including directories and extension.&lt;/P&gt;

&lt;P&gt;Can you attach your grammar file to debug?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 15:54:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117671#M74755</guid>
      <dc:creator>Anastasiya_P_Intel</dc:creator>
      <dc:date>2016-03-30T15:54:17Z</dc:date>
    </item>
    <item>
      <title>Anastasia,</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117672#M74756</link>
      <description>&lt;P&gt;Anastasia,&lt;/P&gt;

&lt;P&gt;Here is the file as a cut and ^paste since (.jsgf) attachments are refused below.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;#JSGF V1.0;&lt;BR /&gt;
	// Inspired by and extending example in &lt;A href="http://www.w3.org/TR/jsgf/" target="_blank"&gt;http://www.w3.org/TR/jsgf/&lt;/A&gt;&lt;BR /&gt;
	grammar cncexample;&lt;BR /&gt;
	public &amp;lt;cnccommand&amp;gt; = [ &amp;lt;start-polite&amp;gt; ] &amp;lt;command&amp;gt; ;&lt;BR /&gt;
	&amp;lt;start-polite&amp;gt; = ( please | would you | could you | kindly ) + ;&lt;BR /&gt;
	&amp;lt;command&amp;gt; = &amp;lt;operation&amp;gt; [ &amp;lt;determiner&amp;gt; ] &amp;lt;object&amp;gt; ;&lt;BR /&gt;
	&amp;lt;operation&amp;gt; = ( open | move | copy | delete | close ) {OPERATION} ;&lt;BR /&gt;
	&amp;lt;determiner&amp;gt; = ( a | an | the ) ;&lt;BR /&gt;
	&amp;lt;object&amp;gt; = ( file | window | menu | link | directory) {OBJECT} ;&lt;/P&gt;

&lt;P&gt;There is "some" progress in that specifying the full path helps though the program then crashes: &amp;nbsp;Is there a minimum proc to run on ? &amp;nbsp;I am testing on a NUC and Windows 10 so should be ok&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;Gregory&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 21:09:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117672#M74756</guid>
      <dc:creator>GMenv1</dc:creator>
      <dc:date>2016-03-31T21:09:54Z</dc:date>
    </item>
    <item>
      <title>Hi Gregory,</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117673#M74757</link>
      <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;

&lt;P&gt;I checked your grammar file in C# and C++ samples. Everything is OK: grammar file is built and speech is recognized. To understand the problem in more details we need to check your environment. Could you check, please:&lt;BR /&gt;
	1. does original sample work (with original grammar file) on your PC?&lt;BR /&gt;
	2. does your grammar file work in original sample on your PC ?&lt;/P&gt;

&lt;P&gt;You can find original C# sample here: C:\Program Files (x86)\Intel\RSSDK\framework\CSharp\DF_SpeechRecognition.cs\DF_SpeechRecognition.cs_vs2010-15.sln?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 16:36:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117673#M74757</guid>
      <dc:creator>Edward_S_Intel1</dc:creator>
      <dc:date>2016-04-05T16:36:50Z</dc:date>
    </item>
    <item>
      <title>Did this ever get resolved? I</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117674#M74758</link>
      <description>&lt;P&gt;Did this ever get resolved? I'm seeing the identical error, including the need to specify GFT_JSGF instead of GFT_NONE contra the example. My code is practically identical to Gregory's, and the information supplied so far hasn't helped me resolve the problem. Many thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 04:07:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117674#M74758</guid>
      <dc:creator>Neil_F_1</dc:creator>
      <dc:date>2016-11-10T04:07:01Z</dc:date>
    </item>
    <item>
      <title>Neil,</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117675#M74759</link>
      <description>&lt;P&gt;Neil,&lt;/P&gt;

&lt;P&gt;this never really got resolved. &amp;nbsp;We could not get the files to work based on the sample. &amp;nbsp;We (by the way, we as &amp;nbsp;a team, not me myself and I!) ended up using a super basic file:&lt;/P&gt;

&lt;P&gt;#JSGF V1.0;&lt;/P&gt;

&lt;P&gt;grammar testgrammar;&lt;/P&gt;

&lt;P&gt;public &amp;lt;query&amp;gt; = &amp;lt;query-what&amp;gt; ( &amp;lt;query-name&amp;gt; );&lt;/P&gt;

&lt;P&gt;&amp;lt;query-what&amp;gt; = ( what | what's );&lt;BR /&gt;
	&amp;lt;query-name&amp;gt; = ( [ your ] name );&lt;/P&gt;

&lt;P&gt;which seems to work but again as far as the sample goes we never managed to make it work.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Gregory&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 06:48:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117675#M74759</guid>
      <dc:creator>GMenv1</dc:creator>
      <dc:date>2016-11-10T06:48:28Z</dc:date>
    </item>
    <item>
      <title>Quote:Gregory M. wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117676#M74760</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Gregory M. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Neil,&lt;/P&gt;

&lt;P&gt;this never really got resolved. &amp;nbsp;We could not get the files to work based on the sample. &amp;nbsp;We (by the way, we as &amp;nbsp;a team, not me myself and I!) ended up using a super basic file:&lt;/P&gt;

&lt;P&gt;&amp;lt;example snipped&amp;gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Gregory&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Gregory,&lt;/P&gt;

&lt;P&gt;I think I may have just solved it -- the path name passed in needs to be of type "wchar" (literal L"pathname"), not char*. The examples show pxcCHAR type being used which, despite its name, is synonymous with wchar_t . BTW, thanks for your quick reply to my earlier post.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2016 15:09:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/BuildGrammarFromFile-incorrect-GID/m-p/1117676#M74760</guid>
      <dc:creator>Neil_F_1</dc:creator>
      <dc:date>2016-11-10T15:09:00Z</dc:date>
    </item>
  </channel>
</rss>

