cmusphinx - CMUSphinx 最简单的关键字“唤醒词”示例?
问题描述
整个 sphinx4 世界的新手。试图在树莓派 3 / Kotlin 上运行“唤醒词”hello world 应用程序。
我认为这意味着pocketsphinx 已经出局了,因为它只是安卓系统......
- 唤醒词短语是“不给糖就捣蛋”
- 我发现的现有演示代码有效(感谢互联网!)以中等准确度识别和输出我对它说的任何内容
- 所以我可以让它注意“trick”这个词——但这似乎很糟糕。
- 我的理解是,如果我将其配置为“只听这个词组,忽略其他任何内容”,它会更好更快地工作。
val configuration = Configuration().apply {
acousticModelPath = "resource:/edu/cmu/sphinx/models/en-us/en-us"
dictionaryPath = "resource:/edu/cmu/sphinx/models/en-us/cmudict-en-us.dict"
languageModelPath = "resource:/edu/cmu/sphinx/models/en-us/en-us.lm.bin"
}
val recognizer = LiveSpeechRecognizer(configuration)
recognizer.startRecognition(true)
generateSequence { recognizer.result }
.takeWhile { "exit"!=it.hypothesis }
.forEachIndexed { index, speechResult ->
println("Hypothesis $index: '${speechResult.hypothesis}'")
}
recognizer.stopRecognition()
我想我需要弄乱配置才能有一个关键字列表:trick or treat /1e-30/
某处?我可以将其内联到代码中吗?我是否需要猜测系统如何解释含糊的“不给糖就捣蛋”的短语?
解决方案
推荐阅读
- http-headers - Typo3 : 在 sendCacheHeaders 上启用最后修改
- anylogic - 从主实验获取变量结果到参数变化实验 - AnyLogic
- gstreamer - 没有这样的元素或插件'v4l2h264enc'
- python - 如何解决未来的警告错误
- javascript - 用 props 填充 antd 表单域
- flutter - Json int 对 Flutter 进行双重解析
- elasticsearch - 在 Elasticsearch 中有两个节点的集群中启用安全性
- reactjs - 如何使用 react-hook-form 和 useContext 在 MultiStepForm 中存储值?
- opengl - 具有固定位置的 OpenGL 广告牌
- reactjs - 有没有办法在 Outsystems 中注销特定用户?