Menu

trouble running sphinx3-simple

Help
2003-01-18
2012-09-22
  • Cyrus Adkisson

    Cyrus Adkisson - 2003-01-18

    I finally got sphinx2 to work both with pre-recorded sound and speech spoken
    through a microphone. Now, I'm moving on to Sphinx3 because I need more accuracy
    and to be able to transcribe broadcast media.

    Unfortunately, I'm having trouble getting it to do anything. I unpacked the 0.1
    version release of Sphinx3 and ran "./configure" in the source directory.
    Everything seems to go fine until I use "make" to make the files. It spits out
    some information and then eventually crashes saying something about
    "./configure":

    [root@localhost sphinx3]# make
    cd . && /bin/sh /home/cyrus/sphinx3/missing --run aclocal
    cd . && \   /bin/sh /home/cyrus/sphinx3/missing --run automake --gnu  Makefile
    cd . && /bin/sh /home/cyrus/sphinx3/missing --run autoconf
    configure.in:112: error: do not use LIBOBJS directly, use AC_LIBOBJ (see section
    `AC_LIBOBJ vs LIBOBJS'
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    WARNING: `autoconf' is missing on your system.  You should only need it if
             you modified `configure.in'.  You might want to install the
             `Autoconf' and `GNU m4' packages.  Grab them from any GNU
             archive site.
    /bin/sh ./config.status --recheck
    running /bin/sh ./configure  --no-create --no-recursion
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for style of include used by make... GNU
    checking for gcc... gcc
    checking for C compiler default output... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking dependency style of gcc... gcc3
    checking for strerror in -lcposix... no
    checking for gcc... (cached) gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc accepts -g... (cached) yes
    checking for gcc option to accept ANSI C... (cached) none needed
    checking dependency style of gcc... (cached) gcc3
    checking for gcc option to accept ANSI C... none needed
    checking how to run the C preprocessor... gcc -E
    checking for egrep... grep -E
    checking for ANSI C header files... yes
    checking return type of signal handlers... void
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    ./configure: line 4359: syntax error near unexpected token `done'
    ./configure: line 4359: `done'
    make: *** [config.status] Error 2

    I'm using RedHat 8.0 and have the most up to date versions of both automake and
    m4 (although, admittedly, I'm not sure how to use them or IF I need to use them
    when it comes to this package). I got this error with the CVS version of sphinx3
    and  I get almost an identical message when "make"-ing the 0.1 release version,
    except that the line in configure causing problems is line 4006. If this is a
    HUGE newbie mistake, please just let me know where I've gone wrong trying to
    install.

    The thing that gets me, though, is I think sphinx3-test works even with the
    error described above. I get the following output, but I don't know if it's
    what's supposed to happening. Here's the output:

    sphinx3-test
    Run CMU Sphinx-3 in Batch mode to decode an example utterance.

    52800 samples in file /usr/local/share/sphinx3/model/lm/an4/pittsburgh.littleendian.raw.
    Will be decoded in blocks of 2000
    root     31969 87.6  3.7 32804 29152 pts/1   S    16:53   0:04 /usr/local/bin/livepretend /usr/local/share/sphinx3/model/lm/an4/an4.ctl /usr/local/share/sphinx3/model/lm/an4 /usr/local/share/sphinx3/model/lm/an4/args.an4

    FWDVIT: P I T T S B U R G H  (null)

    Does that look right? If so, that leads me to sphinx3-simple...
    When I run sphinx3-simple, everything seems to go ok until it asks for a carriage return. When I give it one, the thing just segfaults with this error.

    Hit <cr> BEFORE and AFTER speaking:
    INFO: feat.c(943): Feature buffers initialized to 256 vectors
    INFO: cmn_prior.c(72): mean[0]= 12.00, mean[1..12]= 0.0
    /usr/local/bin/sphinx3-simple: line 11: 31995 Segmentation fault      $S3CONTINUOUS ${ARGS}

    Oh, and I also tried doing aclocal, autoheader, autoconf, automake, and then config, but I get the same type of "not understanding expected word 'done'" or whatever that was when I run config.

    So basically, I have three questions:

    1. Am I compiling right?
    2. If so, is that the right output for sphinx3-test?
    3. What could I be doing incorrectly that would cause the segmentation fault on sphinx3-simple?

    My info: RedHat 8.0, Pentium 686

     
    • Cyrus Adkisson

      Cyrus Adkisson - 2003-01-19

      I traced the seg fault I got from sphinx3-simple to this section of code in feat.c in the feat_s2mfc2feat_block() function: (The segfault is on the memcopy call line)

      residualvecs = 0;
          if (beginutt){
              /* Replicate first frame into the first win frames */
              for (i=0;i<win;i++)
           memcpy(cepbuf[i],uttcep[0],cepsize*sizeof(float32));
              /* beginutt = 0; */  /* Removed by Rita Singh around 02-Jan-2001 */
                                   /* See History at the top of this file */
              bufpos = win;
              bufpos %= LIVEBUFBLOCKSIZE;
              curpos = bufpos;
              jp1 = curpos - 1;
              jp1 %= LIVEBUFBLOCKSIZE;
              jp2 = curpos - 2;
              jp2 %= LIVEBUFBLOCKSIZE;
              jp3 = curpos - 3;
              jp3 %= LIVEBUFBLOCKSIZE;
              jf1 = curpos + 1;
              jf1 %= LIVEBUFBLOCKSIZE;
              jf2 = curpos + 2;
              jf2 %= LIVEBUFBLOCKSIZE;
              jf3 = curpos + 3;
              jf3 %= LIVEBUFBLOCKSIZE;
              residualvecs -= win;
          }

      My guess would be that one of the vectors in the arrays referenced by the memcopy call isn't large enough, and most likely, it's the "win" variable that's causing problems and accessing an array portion that isn't there. So, if you track it backwards, win is set by the feat_window_size(fcb), and fcb is passed into the fuction by this line

      live_nfeatvec = feat_s2mfc2feat_block(kbcore_fcb(kbcore), mfcbuf,  live_nfr, live_begin_new_utt, live_endutt, &live_feat);

      ...in live.c. kbcore_fcb() is a globally defined function with this definition in src/libs3decoder/kbcore.h:

      #define kbcore_fcb(k)         ((k)->fcb)

      I have absolutely no idea what this means. I guess it returns the value of kbcore->fcb, whatever that is.

      A side note, I'm kinda new to this whole sourceforge thing... do bug identifications and fixes (not that this is one) go in the dicussion forum rather than the help forum?

      Cyrus

       
    • Scott Silliman

      Scott Silliman - 2003-03-14

      hmm.. I'm getting the same exact error - on 3 different  machines:

      * a RH7.3 box with a SoundBlaster Live5.1
      * a RH8 box with a SoundBlaster PCI 16
      * a RH8 laptop with VIA vt82C686 AC97 onboard audio.

      I've tried both the Sphinx3-0.1 and the lastest from cvs with the same results on all 3 machines. 

      The error I'm getting is:

      Hit <cr> BEFORE and AFTER speaking:
      INFO: feat.c(943): Feature buffers initialized to 256 vectors
      INFO: cmn_prior.c(72): mean[0]= 12.00, mean[1..12]= 0.0
      /usr/local/bin/sphinx3-simple: line 11: 23133 Segmentation fault      $S3CONTINUOUS ${ARGS}

      Anyone out there have any ideas?

      -Scott

       
    • Anonymous

      Anonymous - 2003-10-14

      The problem is  that memcpy(cepbuf[i],uttcep[0],cepsize*sizeof(float32)); is copying data to cepbuf[i] but no memory was
      allocated for cepbuf[i].

       
    • Struan Bartlett

      Struan Bartlett - 2003-10-19

      On my setup, this problem in fact appears to be that uttcep[0] is null!

      This is because live_utt_decode_block in live.c calls feat_s2mfc2feat_block with a null argument for uttcep.

      This is because, earlier in live_utt_decode_block, fe_process_utt is called to allocate the memory for uttcep, but nsamps==0.

      This is because live_utt_decode_block is called by utterance_loop in main_live_example.c with k=0.

      This is because ad_read can return that value, but this is not checked for.

       
    • Anonymous

      Anonymous - 2004-01-31

      I'm also having trouble running sphinx3-simple.
      I want to know what the solves are exactly.
      What and where can I change to compile this program?

      Thanks a lot.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.