Menu

Speech Recognition for games(Unity)

Help
Anonymous
2011-07-02
2017-01-29
  • Anonymous

    Anonymous - 2011-07-02

    Currently, i am creating a game for my school project. I want to add speech
    recognition into the game. I am wondering is Sphinx a good software that i can
    start to work with. Could someone please tell me if Sphinx is like a plugin
    that allow me to embed into Unity(game development software)?

    Anyone can tell me how to use it?? Like how to use this open source software.

     
  • Anonymous

    Anonymous - 2011-07-03

    Hi nshmyrev,

    Thank you for the reply.

    From your reply, i assume that you mean it is possible to include speech
    recognition into the game (Unity)? And i don't really understand what you mean
    by "it's straghtforward to plug pocketsphinx as an external component." Could
    you kindly please explain in details about it??

    Is there any ready available open source code that i can used to start on my
    game??

     
  • Nickolay V. Shmyrev

    it is possible to include speech recognition into the game (Unity)

    Yes, it is possible

    Could you kindly please explain in details about it??

    Pocketsphinx is a shared library (dll) that provides all required
    functionality. To use it in your game you need to use standard C# way to load
    shared libraries and invoke them. You can read more following the links above

    Is there any ready available open source code that i can used to start on my
    game??

    I do not think there is open source implementation of this.

     
  • Anonymous

    Anonymous - 2011-07-05

    Hi nshmyrev,

    You seem to know very well regarding this. I have the feeling that you are
    working on this?

    thank you.

     
  • Nickolay V. Shmyrev

    I work on pocketsphinx, yes. I don't develop C# applications right now though
    I had some experience with it. The things I described to you are actually
    rather straghtforward.

     
  • Anonymous

    Anonymous - 2011-07-06

    Hi nshmyrev,

    Probably because i did not read up more on this thatwise i am asking a rather
    straightforward question.

    I am quite lost. I don't know how can i start about doing/coding it? Please
    give me some advice on how can i start about doing it. Thank you :)

     
  • Nickolay V. Shmyrev

    Please give me some advice on how can i start about doing it.

    Start IDE and create the project. Then create main class. Then write main
    methods. Then implement them one by one.

     
  • Anonymous

    Anonymous - 2011-07-10

    Start IDE and create the project. Then create main class. Then write main
    methods. Then implement them one by one.

    -> Maybe i am not clear with myself, what i mean is i really don't know how to get started with pocketSphinx. Like import the dll into Visual Studio then start coding? How do i get start? I know i need to start creating project, create main class and main method. I need more details explanation.

    Thank you

     
    • Michael Knight

      Michael Knight - 2016-01-03

      Yup, right there with you on this missypooh, there seems to be a lack of straight forward clear conscise step by step how too.
      I would very much like some help with HOW to get speach rrcognition working with my project too but people seem to be far too vague and dare I say "Secretive" about HOW to do it. I mean come on folks yur not gaurding any real secrets here so please share some more forth coming informative information on exactly HOW to do this.

       
  • Brian Hodge

    Brian Hodge - 2017-01-29

    Thank you for making that demo above. I am working on a Windows plugin for Unity / Pocketsphinx. The 64 bit version works great. The 32 bit plugin crashes every time on ps = ps_init(config);

    I am using the same paths to the Models and dependencies, and I have compiled win32 versions of sphinxbase, pocketsphinx, and my plugin.

    Is there anything you can think of that would be causing this crash?

    I can run the continous example, from the win32 folder, in my command line with success, so I would think I could use those DLLs, but in case I built my own.

    Please help!

    -Also, both x86, and x86_64 unity plugin folders have the same exact dlls for all plugins, but merely seperate architectures.

    Regards,
    Brian Hodge
    Technical Director
    Kadho Sports / kadho Inc.

     
    • Nickolay V. Shmyrev

      Who cares about 32bit these days ;)

      Something should be wrong in bindings/etc. It is hard to say. Could you try to run this in simple command line with mono first?

      Also it is not quite clear what and how did you compile, you need to create a new separate project for unity native plugin with all the required sources and compile a single DLL.

       
      • Brian Hodge

        Brian Hodge - 2017-01-29

        Hah, yes 32bit is a dinosaur, but some of our clients need us to accomodate all the way back to XP 32-bit.

        I am not using a single DLL for the 64 bit version, its my dll, with the sphinxbase.dll and pocketsphinx.dll in the same x86_64 plugin folder.

        The 32 bit is built the same way, except i changed the win32 build options in visual studio to point to the 32 bit libs. Everything is seemingly done verbatum to the 32 bit version, so I am lost. I feel like maybe some float64 or something is doing it, but i see warnings talking about a conversion loss, so then I think no, it can't be.

        Also, I have tried MD and MT to assure its set for Multuthreaded Run Time.

        Thank you for your time.

        -Brian Hodge

         

        Last edit: Brian Hodge 2017-01-29
        • Brian Hodge

          Brian Hodge - 2017-01-29

          Would you mind if I contacted you privately? Perhaps provide you with a working example of my 64 bit version with the broken 32 bit code? Ill have to update the example as I have been working out of the main project after completing the 64 bit version and splicing it all.

           
          • Nickolay V. Shmyrev

            Yes, sure, my email is nshmyrev@gmail.com skype nv_shmyrev.

             
            • Brian Hodge

              Brian Hodge - 2017-01-30

              So, in cleaning up the example project to send to you, i decided to build the x86 (Called win32 in Visual Studio from the same PreAlpha.tar.tz's that I used to make the 64 bit version and it worked. I was trying to use the Win32 zip, which i feel technically should work, just on a broader range of devices, but it seems Unity didn't like it.

              Thank you very much for your time!.

               
  • Nishant Anindya

    Nishant Anindya - 2017-04-04

    Hey Nickolay,
    I have tried this project :https://github.com/cmusphinx/pocketsphinx-unity-demo, I have a doubt, When it detected word "oh unity", after that what should I do, Like I want to display text whatever I say, Can you please guide me what should I do for that.
    Thanks

     

Log in to post a comment.