开发者

Can the input with attr "x-webkit-speech" be with language other than English?

Currently, the Chrome x-webkit-speech seems only works well with English, can it be with other langu开发者_运维百科ages?


You can also add the lang attribute to your <input> element:

<input  type="text"  lang="es-MX"  x-webkit-speech  speech  onwebkitspeechchange="this.form.submit();" />

This way you can have multiple controls in different languges in your page.

Cheers!


Add an attribute to <body> like

<body lang="zh-Hans">

No official doc for this point, just my practice.


The x-webkit-speech attribute has been deprecated for over a year now. In favor of the JavaScript Speech recognition API. I made a JS module that impliments the API for <input>s:

Speech input | Github

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜