如何限制'watson-HTML5-speech-recognition'仅识别数字 [英] How do I constrain 'watson-HTML5-speech-recognition' to recognize only numbers

查看:90
本文介绍了如何限制'watson-HTML5-speech-recognition'仅识别数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi! I'm devloping a speech recognition app using 'watson-html5-speech-recognition'. How can I constrain the recognition context to recognize only numbers (i.e the recognized word should be a number e.g 101, 40, 76, 4.. etc) and not (one hundred and one, forty, seventy six, four.. etc).

I'm working on a math app, where the result should never be a string text, just numbers. Thanks





我尝试过:



我尝试使用javascript在识别后解析识别的文本(如果是isNumber()),但我认为最好在识别之前将说出的单词限制为仅数字而不是之后..



What I have tried:

I tried using javascript to parse the recognized text(if isNumber()) after recognition, but I think it will be better to constrain the spoken words to only numbers before recognizing and not after..

推荐答案

语音识别将语音转换为字符串,我认为不可能也不适合与语音识别引擎纠缠在一起。此外,在首先解析之前(从音频信号到实际字符串),你无法识别任何东西。

Speech recognition converts spoken words to string, and I do not think it is possible, nor suitable, to entangle with the speech recognition engine for that. Moreover, you cannot recognize anything before having it parsed in the first place (from audio signal to actual string).
Real-One写道:
Real-One wrote:

我认为最好在识别之前将说出的单词限制为仅数字而不是之后。

I think it will be better to constrain the spoken words to only numbers before recognizing and not after.



你可能不得不重新考虑这个观点:)

亲切。


You may have to reconsider this opinion :)
Kindly.


这篇关于如何限制'watson-HTML5-speech-recognition'仅识别数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆