Menu

New Topic. Pocketsphinx, Unity, Android

Help
Andrew
2019-10-18
2020-01-13
  • Andrew

    Andrew - 2019-10-18

    Hi.
    Lunch Pocketsphinx on Windows 10x64 using Unity. Ok!
    Show this in video:
    https://youtu.be/njGKnYtoxB4

    Try lunch on Android and get error:
    "EntryPointNotFoundException: ps_args"

    Part of script:

    using System;
    using System.Runtime.InteropServices;
    
    namespace Pocketsphinx {
        public class CmdLineConfig {
            internal readonly IntPtr _cmdln;
    
            [DllImport("__Internal")]
            private extern static IntPtr ps_args();
    
            [DllImport("__Internal")]
            private static extern IntPtr cmd_ln_init(
                IntPtr inout_cmdln,
                IntPtr defn,
                Int32 strict,
                IntPtr _nl);
    
            public CmdLineConfig()
            {
                _cmdln = cmd_ln_init(IntPtr.Zero, ps_args(), 1,
                    IntPtr.Zero);
    
                if (IntPtr.Zero.Equals(_cmdln)) {
                    throw new Exception("cmd_ln_init returned NULL");
                }
            }
    }
    

    Folders in Unity:
    Assets\Plugins\Android\libs\build.gradle
    Assets\Plugins\Android\libs\pocketsphinx-android-5prealpha-release.aar

    Assets\Plugins\Win64\pocketsphinx.dll
    Assets\Plugins\Win64\sphinxbase.dll

    Please, tell me what i'm doing wrong.

     

    Last edit: Andrew 2019-10-18
    • Nickolay V. Shmyrev

      You didn'tcompile pocketsphinx wrapper for android properly. You can find precompiled version here:

      https://alphacephei.com/kaldi/PsTest.zip

       
      • Andrew

        Andrew - 2019-10-25

        Nickolay, how compile pocketsphinx wrapper for android?
        После чтения руководств и простмотра видео в голове каша. Не понимаю куда копать.

         

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.