TLSphinx iOS 语音识别开源项目

我要开发同款
匿名用户2015年07月06日
50阅读
开发技术C/C++Swift
所属分类其他(Others)、iOS代码库
授权协议MIT

作品详情

TLSphinx是一个围绕着Pocketsphinx的封装器,一个基于CMUSphinx的便携库,允许应用程序执行的语音识别而无需将音频移出设备。

示例:

import TLSphinxlet hmm = ...   // Path to the acustic modellet lm = ...    // Path to the languaje modellet dict = ...  // Path to the languaje dictionaryif let config = Config(args: ("-hmm", hmm), ("-lm", lm), ("-dict", dict)) {  if let decoder = Decoder(config:config) {      let audioFile = ... // Path to an audio file      decoder.decodeSpeechAtPath(audioFile) {          if let hyp: Hypotesis = $0 {              // Print the decoder text and score              println("Text: \(hyp.text) - Score: \(hyp.score)")          } else {              // Can't decode any speech because an error          }      }  } else {      // Handle Decoder() fail  }} else {  // Handle Config() fail  }
查看全文
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论