Menu

Continuous recognition from microphone on OS X

Help
2014-10-01
2014-10-03
  • Jamie Bullock

    Jamie Bullock - 2014-10-01

    Hi,

    I understand from various posts on the forum, for example this one that the sphinxbase functions for reading from the A/D converter are not supported on OS X.

    However, if I understand correctly, all the pocketsphinx_continuous example is doing is reading blocks of PCM audio from an input device (microphone) and passing these to ps_process_raw(). So presumably any mechanism by which audio can be passed to ps_process_raw() in real-time (for example from a ring buffer) would also suffice? The configuration I am planning to use in my application is to have CoreAudio write sample data into a ring buffer in its input callback, and then read from the buffer using ps_process_raw() in a separate thread.

    Can you forsee any issues using pocketsphinx in this way? Is ps_process_raw() intended to run in realtime (for example it doesn't make any calls to non-realtime-safe functions like malloc())?

    Thanks,

    Jamie

     
  • Nickolay V. Shmyrev

    I understand from various posts on the forum, for example this one that the sphinxbase functions for reading from the A/D converter are not supported on OS X.

    Support has been added a week ago with OpenAL. You can checkout latest code from github:

    http://github.com/cmusphinx/sphinxbase

    The configuration I am planning to use in my application is to have CoreAudio write sample data into a ring buffer in its input callback, and then read from the buffer using ps_process_raw() in a separate thread.

    That would also work.

     
  • Jamie Bullock

    Jamie Bullock - 2014-10-02

    Great. Many thanks for the quick reply.

    Jamie

     

Log in to post a comment.