Menu

STM32 and pocketsphinx

Help
2017-07-24
2017-07-28
  • Costas Tryfonas

    Costas Tryfonas - 2017-07-24

    Hi community,

    I am trying to import pocketsphinx into an STM32F7. Up until now I am trying to static compile and link sphinxbase. However as it seems sphinxbase needs Bison for the Language model to compile. Has anyone compiled sphinxbase with an arm toolchain before? Is it possible to have bison inside an STM32 microcontroller ? I am comfused

    Costas

     
  • Costas Tryfonas

    Costas Tryfonas - 2017-07-24

    Hi Nikolay,

    I am getting this compiling error in Windows with eclipse oxygen,I am not in linux:

    yacc  ../Application/sphinxbase/src/libsphinxbase/lm/jsgf_parser.y 
    process_begin: CreateProcess(NULL, yacc ../Application/sphinxbase/src/libsphinxbase/lm/jsgf_parser.y, ...) failed.
    make (e=2): The system cannot find the file specified.
    
    make: *** [../Application/sphinxbase/src/libsphinxbase/lm/jsgf_parser.c] Error 2
    

    Have you seen it before, have you any idea?

     
    • Nickolay V. Shmyrev

      You can remove that file from the sources and just leave the generated c file.

       
  • Costas Tryfonas

    Costas Tryfonas - 2017-07-24

    Thanks Nickolay, its ok now. However I get the below:

    In this passage :

    return ((read_off(address) >> get_shift(address.offset & 7, length)) & mask);

    in bitarr.c I get this:

    ../Application/sphinxbase/src/libsphinxbase/util/bitarr.c: In function 'bitarr_read_int57':
    ../Application/sphinxbase/src/libsphinxbase/util/bitarr.c:84:32: error: invalid operands to binary >> (have 'uint64 {aka double}' and 'int')
         return ((read_off(address) >> get_shift(address.offset & 7, length)) & mask);
    

    Should I make 7 a double or there is something else going on?

     
    • Nickolay V. Shmyrev

      Change sphinxbase/include/prim_type from

      typedef double          int64;
      typedef double          uint64;
      

      to

      typedef long          int64;
      typedef long          uint64;
      
       
  • Costas Tryfonas

    Costas Tryfonas - 2017-07-24

    I am getting undefined reference to "mmap","munmap, "sysconf" , "getrusage" on mmio.c and profile.c even though I have imported mman.h , resource.h ,time.h and unistd.h . Any idea?

    Can I not use memory mapping for the pocketsphinx with STM32?

     
    • Nickolay V. Shmyrev

      You can disable mmap with defines, see ADSPBLACKFIN define in the code, you can define a similar thing.

       
  • Costas Tryfonas

    Costas Tryfonas - 2017-07-25

    Hi Nickolay,

    I get the below errors :

    lrt
    process_begin: CreateProcess(NULL, lrt, ...) failed.
    make (e=2): The system cannot find the file specified.
    
    make: [pre-build] Error 2 (ignored)
    

    and more important this:

    acmod.c line 84. Folder '0:/' doesnot contain acoustic model definition 'mdef'

    I have a usb stick mounted on 0:/ containing the tested acoustic model with mdef and all needed files. But I get the above. Does this means It can't see it or there is something else? I listed all the files inside the USB and they get recognized by the STM.

    I tried getting the log file but it says me this : cannot redirect log out put , pocketsphinx line 234
    on my STM LCD

     
  • Costas Tryfonas

    Costas Tryfonas - 2017-07-28

    One question..

    Do I need to rewrite the pocketsphinx.c so I can use f_open ( FatFs USB drive) instead of fopen from stdio??

     

Log in to post a comment.