airbai
airbai

Reputation: 3966

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 languages?

Upvotes: 6

Views: 3849

Answers (3)

Web_Designer
Web_Designer

Reputation: 74610

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

Upvotes: 0

victmo
victmo

Reputation: 1216

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!

Upvotes: 8

airbai
airbai

Reputation: 3966

Add an attribute to <body> like

<body lang="zh-Hans">

No official doc for this point, just my practice.

Upvotes: 4

Related Questions