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:
精彩评论