简体   繁体   English

如何让OpenEars在iOS上识别语音号码?

[英]How can I get OpenEars to recognize spoken numbers on iOS?

I'm looking for API to convert spoken items into text on iOS, but mainly for numbers and letters like 1, 2, 3, 4 and a, b, c, d. 我正在寻找API以将口语项目转换为iOS上的文本,但主要用于数字和字母(例如1、2、3、4和a,b,c,d)。

I've tried OpenEars as many people suggested, but it appears to only support certain ords, such as "GO FORWARD BACKWARD LEFT RIGHT START STOP TURN". 我尝试了许多人建议的OpenEars,但它似乎仅支持某些命令,例如“ GO FORWARD BACKWARD LEFT RIGHT START STOP TURN”。 Can it be used to recognize generic words or spoken numbers? 可以用来识别通用词或口号吗?

I have also tried the iSpeech API, but when I speak a string of numbers like 12345, it can only return the text "one two three four five", and it can only give me the result of the recognition instead of a list of guesses (like the Google voice recognition API on Android). 我也尝试过iSpeech API,但是当我说一串数字(如12345)时,它只能返回文本“一二三四五”,并且只能给出识别的结果,而不是猜测列表(例如Android上的Google语音识别API)。

How can I use either of these APIs (or another alternative) to recognize spoken numbers or letters? 如何使用这两个API(或其他API)来识别语音数字或字母?

To learn how to create custom language models and how to dynamically create language models with OpenEars (a language model is your custom set of words), read the OpenEars docs here: 要了解如何创建自定义语言模型以及如何使用OpenEars动态创建语言模型(语言模型是您的自定义单词集),请在此处阅读OpenEars文档:

http://www.politepix.com/openears/yourapp http://www.politepix.com/openears/yourapp

To learn how to use an acoustic model with OpenEars which is oriented towards recognizing spoken digits, read this discussion in the OpenEars forum: 要了解如何在面向识别语音数字的OpenEars中使用声学模型,请在OpenEars论坛中阅读以下讨论:

http://www.politepix.com/forums/topic/way-to-see-phonemes-openears-heard http://www.politepix.com/forums/topic/way-to-see-phonemes-openears-heard

You can also look at the code in the OpenEars sample app, which is heavily commented and shows an example of changing the apps "vocabulary" inline. 您还可以查看OpenEars示例应用程序中的代码,该代码受到了严重的注释,并显示了内联更改应用程序“词汇”的示例。 If you have more questions about implementing OpenEars, I recommend making an account on the OpenEars forums (I'm the OpenEars developer). 如果您对实施OpenEars有更多疑问,建议您在OpenEars论坛上注册一个帐户(我是OpenEars开发人员)。

I used the following JSGF based on the sphinx unit tests . 我基于sphinx单元测试使用了以下JSGF。

<int0> = (ZERO | OH);
<int10> = TEN;
<int100> = HUNDRED;
<int1to9> = ONE | TWO | THREE | FOUR | FIVE | SIX | SEVEN | EIGHT | NINE;
<int0to9> = ( <int0> | <int1to9> );
<int01to09> = <int0> <int1to9>;
<int11to19> = ELEVEN | TWELVE | THIRTEEN | FOURTEEN | FIFTEEN | SIXTEEN | SEVENTEEN | EIGHTEEN | NINETEEN;
<tens> = TWENTY | THIRTY | FORTY | FIFTY | SIXTY | SEVENTY | EIGHTY | NINETY;
<int20to99> = ( <tens> [<int1to9>] );
<int10to99> = ( <int10> | <int11to19> | <int20to99> );
<int1to99> = ( <int1to9> | <int10to99> );
<int0to99> = ( <int0> | <int1to99> );
<int01to99> = ( <int01to09> | <int10to99> );
<int1to9hundreds> = ((A  | <int1to9>) <int100>);
<int101to999> = (<int1to9> (<int01to09> | <int10> | <int11to19> | <int20to99> ));
<int100to999> = (<int1to9hundreds> [[AND] <int1to99> ]);
<int1to999> = ( <int1to99> | <int100to999> | <int101to999> );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM