Speech Recognition Engines

Flat
a problem of HTK source codes
User: hezhourongro
Date: 5/19/2013 8:43 am
Views: 5338
Rating: 1
         I am a beginner of HTK ,Recently I read the source codes of HTK,but I have a problem about the source codes of "esignal.c" in HTKLib(version 3.3).In the line(974) of "esignal.c" there are a line of codes as fellows:
       if (strcmp(architecture, ARCH) == 0)    /* native architecture */
       When I want to try to compile and run esignal.c in visual studio 2010, two errors are throwed out,all about the undefined symbol: ARCH.the other position is line(1184) of "esignal.c".  The annotation says ARCH is a native architecture. Then I go to the "esignal.h",look for the defination of native architecture,the result as fellows:
      from line(100) of  "esignal.h" :
      /* Format Variant */

      #define UNKNOWN 0
      #define EDR1         1
      #define EDR2         2
      #define NATIVE         3
      #define ASCII         4
      according to the defination ,I think maybe I should change the "ARCH " to "NATIVE",I make the change because I find the codes below the line(974) of "esignal.c" are:
     if (strcmp(architecture, ARCH) == 0)    /* native architecture */
      {
         if (arch != NULL)
            *arch = NATIVE;

         if (!ReadNativeFieldList(&list, file))
            return NULL;
      }
   else if (strcmp(architecture, "EDR1") == 0)
      {
         if (arch != NULL)
            *arch = EDR1;

         /*
          * On machines whose native architecture is EDR1, could call
          * ReadNativeFieldList here.
          */
         if (!ReadEdrFieldList(&list, file, EDR1))
            return NULL;
      }
   else if (strcmp(architecture, "EDR2") == 0)
      {
         if (arch != NULL)
            *arch = EDR2;
         /*
          * On machines whose native architecture is EDR2, could call
          * ReadNativeFieldList here.
          */
         if (!ReadEdrFieldList(&list, file, EDR2))
            return NULL;
      }
   else if (strcmp(architecture, "ASCII") == 0)
      {
         if (arch != NULL)
            *arch = ASCII;

         if (!ReadAsciiFieldList(&list, file))
            return NULL;
      }
   else
      {
         if (arch != NULL)
            *arch = UNKNOWN;

         return NULL;           /* Unsupported architecture. */
      }

   return list;
}
So I think maybe it is right to change the code like what change mentioned above.But when I resave the "esignal.c" and re-run it ,there are other new errors. And now I don't konw how to do . what's the problem with it? who can help me ? the problem confuses me a long time

--- (Edited on 5/19/2013 8:43 am [GMT-0500] by ) ---

Re: a problem of HTK source codes
User: Visitor
Date: 7/30/2013 4:19 pm
Views: 170
Rating: 2

this variable is set in makefile which in turn is generated by configure script. (configure: 5507 and below). The value is taken from the $host_cpu variable of Autoconf. I'm building my project under linux in QTCreator so I just run the script and looked through the generated Makefile in HTKLib directory. There I found the value x86_64 for my architecture. It was sufficient for successful build. You may want to launch autoconf under Windows (I've never done it) or try one of the options enumerated in configuration script if you're feeling lucky.

P.S. Don't forget to add esig_*.c files to the project or you get linker error.

Good luck!

--- (Edited on 7/30/2013 4:19 pm [GMT-0500] by Visitor) ---

Re: a problem of HTK source codes
User: hezhourongro
Date: 8/27/2013 9:03 am
Views: 2217
Rating: 1

      sorry to reply you so late ,recently I haven't come here. I am very glad for your answer.

      If I want to run the resource code of HTK 3.3 in VC2008, How should I do? How many files should I add? and How can I finish recognition in VC2008?  just give me some basic procedures.

     I look forward to your answer.

--- (Edited on 8/27/2013 9:03 am [GMT-0500] by hezhourongro) ---

PreviousNext