Is there a way to use a grammar with the HTML 5 speech input API?

前端 未结 2 1917
一生所求
一生所求 2020-11-30 10:42

I\'m working with the HTML 5 speech input API and I want to let the server know which answers it can expect to be returned from the speech input. Is there a way to set a lis

2条回答
  •  死守一世寂寞
    2020-11-30 11:21

    I assume your a talking about the Speech Input API Specification as defined by the W3C. According to this specification grammars are supported, which is the method used by speech recognition systems to restrict possible inputs. Look for the section titled "Speech recognition grammars". The problem will be how well it is supported in the particular browser that is being used, which is the case for an HTML 5 specific function since it is not a completed standard yet. Chrome seems to be the most up to date with the standard. Checkout this blog post from the Chrome team on implementing the Speech Input API.

提交回复
热议问题