This is done with CMUSphinx 0.7 (so sphinxbase 0.7 and pocketsphinx 0.7). The files are archived at the end of the article. The process also require access to a linux machine and the Eclipse IDE.
- Download Sphinx base and pocket sphinx (http://cmusphinx.sourceforge.net/wiki/download/ )
- Create a directory somewhere, untar both to ./sphinxbase and ./pocketsphinx (lose the -0.x version suffix)
- For each of the two, do the usual ./autogen.sh ./configure, make, make install (make install require root)
- Check ./pocketsphinx/swig has libpocketsphinx_jni.so in it. If not, do a make in that directory
- Download the PocketSpinxAndroiDemo
- untar it to the same directory created in 2
- cp -r ./pocketsphinx/swig/edu ./PocketSphinxAndroidDemo/jni/
- cd ./PocketSphinxAndroidDemo/jni/
- Update SPHINX_PATH to the directory created in 2
- Open Android.mk, edit LOCAL_STATIC_LIBRARIES from whatever it was before to “pocketsphinx sphinxlm sphinxfeat sphinxfe sphinxutil” (without qoutes)
- Install Android NDK (http://developer.android.com/sdk/ndk/index.html )
- stay in the jni directory, do a ndk-build (see the ndk link about for instructions on building if it is not clear)
Now we are ready to open this in Eclipse
- Open eclipse and import the project, ignore any build warnings/errors
- Untick Project -> Build Automatically (This is personal choice, since the JNI build process is heavy I dont like it building all the time)
- Project -> Properties -> Builders
- Select SWIG -> Edit -> for Working Directory, select Browse Workspace and pick the jni directory, In the Refresh tab, select The folder containing the selected resource, in Build Options, untick Specify working set of relevant resources (This option may be hidden in the dialog, if you dont see it, maximize the Configuration window).
- Select NDK build -> Edit -> Set the correct location for ndk-build, select the correct Working directory (Browse workspace and then select the jni directory). In the Refresh tab, select The project containing the selected resource, in Build Options, untick Specify working set of relevant resources (This option may be hidden in the dialog, if you dont see it, maximize the Configuration window).
- Project -> Build Project. If you see any errors, check that step 4 and 5 are carried out correctly. The project should build without error. A console may appear with red texts, just confirm that they are warning messages from building the c code and you should be ok
We should now have a built Android application ready for testing
- In the emulator (or phone), create under primary storage (whatever is returned by the getExternalStorageDirectory). For example if you have a sdcard this would be /mnt/sdcard
- If using the emulator, call adb shell from a console window, and use mkdir command for the step below (to create directories on the emulator)
- Create directory structure: Android/edu.cmu.pocketsphinx/hmm/en_US/hub4wsj_sc_8k, Android/edu/edu.cmu.pocketsphinx/lm/en_US/
- Copy pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k/* into the emulator/phone
- Copy pocketsphinx/model/lm/en_US/* into emulator/phone
- In eclipse, open the RecognizerTask.java file, look for c.setString(“-lm”
- Make sure the files loaded in the code around step 6 exists (especially the .dict file may have a different name)
- Now we can run the application!
If the app crashes for any reason, go to sdcard/Android/edu.cmu.pocketsphinx and there should be a log file (pocketsphinx.log) from the native library.
Misc thought
- On my machine (OpenSuSE 11.3) the swig directory was empty after make. Go into swig directory and call make, the errors will be displayed (for me it was because I didn’t have swig installed)
- By default make install installs to /usr/local/lib which can cause problems on some systems. If you get errors with any of the sphinx stuff saying some library is not found, use the ldd and strace commands to see where they are looking for the libs, and symlink them. Alternatively supply another install location to make install
- While working in eclipse, if you see any errors along the lines of “Refresh scope invalid”, check step 4 and 5 are carried out from the Eclipse section above.
Files required **Before downloading these archives, try using the latest build from the official website first**:
相关推荐
Pocketsphinx的Android版本包含了所有必要的库和资源,包括声学模型、语言模型以及字典,这些都是识别语音所必需的。 接着,你需要配置Pocketsphinx的设置。这包括指定搜索模式(例如关键词识别或自由格式语音识别...
DAB变换器双向运行模型:单重移相控制策略与切换过程电压幅度研究,DAB变器双向运行模型。 单重移相控制 不少伙伴咨询DAB怎么改反向运行。 特意搭建了这个双向运行的DAB模型。 可实现正反向的不间断运行,是一个集成在一起的模型。 如展示图所示,图中0.3s处改变了功率传输的方向。 如果想研究切过程电压幅度的问题,可看我另一个关于DAB控制的方法 ~ ,DAB变换器; 双向运行模型; 移相控制; 功率传输方向切换; 电压幅度。,DAB变换器双向运行模型:单重移相控制与电压幅度切换过程研究
掼蛋平台使用说明书1006 (1).pdf
"密歇根大学燃料电池系统Matlab Simulink模型:电堆、压缩机拟合及辅助模块的全面构建与解析",密歇根大学质子交膜燃料电池系统模型,matlab simulink模型 包含: 电堆模型。 压缩机拟合模型。 理想加湿器、冷却器模型。 阳极、阴极流道模型。 进排气总管模型。 包含模型1:1搭建过程文件。 每一个模块都有搭建过程,都有说明文件,中文wrod版。 附赠参考文。 ,关键词: 密歇根大学; 质子交换膜燃料电池系统模型; MATLAB Simulink模型; 电堆模型; 压缩机拟合模型; 理想加湿器、冷却器模型; 阳极、阴极流道模型; 进排气总管模型; 搭建过程文件; 说明文件; 附赠参考文。,"密歇根大学燃料电池系统模型:Matlab Simulink电堆与辅助组件模型集"
免费JAVA毕业设计 2024成品源码+论文+录屏+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
1、文件内容:perl-DBD-MySQL-4.023-6.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/perl-DBD-MySQL-4.023-6.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
ollama基础知识简介.md
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
YD-T 4961.3-2024 隐私计算 跨平台互联互通 第3部分:互联协议.pdf
资源说明: 1:csdn平台资源详情页的文档预览若发现'异常',属平台多文档切片混合解析和叠加展示风格,请放心使用。 2:29页图文详解文档(从零开始项目全套环境工具安装搭建调试运行部署,保姆级图文详解),旨在为更多的人甚至零基础的人也能运行、使用和学习。 3:配套毕业论文,万字长文,word文档,支持二次编辑。 4:配套答辩ppt,pptx格式,支持二次编辑。 5:工具环境、ppt参考模板、相关电子教程、视频教学资源分享。 6:资源项目源码均已通过严格测试验证,保证能够正常运行,本项目仅用作交流学习参考,请切勿用于商业用途。 7:项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通。 内容概要: 本系统基于B/S网络结构,在IDEA中开发。服务端用Java并借Spring Boot框架搭建后台。前台采用支持HTML5的VUE框架。用MySQL存储数据,可靠性强。 能学到什么: 使用Spring Boot搭建后台。VUE框架构建前端交互界面、前后端数据交互、MySQL管理数据、从零开始环境搭建、调试、运行、打包、部署流程。
eLab
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
CST超表面仿真技术在近场成像与全息案例应用中的实践与探索,cst超表面仿真 近场成像与全息案例 ,核心关键词: 1. CST超表面仿真; 2. 近场成像; 3. 全息案例。,CST超表面仿真与近场成像全息案例
1、文件内容:perl-Module-Runtime-0.013-4.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/perl-Module-Runtime-0.013-4.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装
基于Matlab的程序化设计与优化:交直流混合微网系统的随机性建模与稳定运行策略研究,交直流混合微网 程序matlab 采用拉丁超立方抽样和多场景缩减,考虑风光等随机性建模,利用粒子群算法,计算得到三个微网的优化程序运行稳定,有详细资料。 ,交直流混合微网; MATLAB程序; 拉丁超立方抽样; 多场景缩减; 风光随机性建模; 粒子群算法; 微网优化运行稳定; 详细资料,Matlab实现:交直流混合微网优化程序稳定运行研究
资源说明: 1:csdn平台资源详情页的文档预览若发现'异常',属平台多文档切片混合解析和叠加展示风格,请放心使用。 2:29页图文详解文档(从零开始项目全套环境工具安装搭建调试运行部署,保姆级图文详解),旨在为更多的人甚至零基础的人也能运行、使用和学习。 3:配套毕业论文,万字长文,word文档,支持二次编辑。 4:配套答辩ppt,pptx格式,支持二次编辑。 5:工具环境、ppt参考模板、相关电子教程、视频教学资源分享。 6:资源项目源码均已通过严格测试验证,保证能够正常运行,本项目仅用作交流学习参考,请切勿用于商业用途。 7:项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通。 内容概要: 本系统基于B/S网络结构,在IDEA中开发。服务端用Java并借Spring Boot框架搭建后台。前台采用支持HTML5的VUE框架。用MySQL存储数据,可靠性强。 能学到什么: 使用Spring Boot搭建后台。VUE框架构建前端交互界面、前后端数据交互、MySQL管理数据、从零开始环境搭建、调试、运行、打包、部署流程。
1、文件内容:perl-HTTP-Cookies-6.01-5.el7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/perl-HTTP-Cookies-6.01-5.el7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、安装指导:私信博主,全程指导安装