English 中文(简体)
浏览器内的语音探测
原标题:voice activity detection within the browser

因此,这是一种骗局。

我想写一个网络应用程序,记录用户所说的话,然后将样本发送给服务器一侧处理。

The algorithm I have in mind is as follows:

  1. start a recording session once the user has clicked on a button
  2. wait for the user to have said a single word (assuming he know he s supposed to say a single word)
  3. stop the recording once he said it
  4. send the samples to the server, say using HTTP
  5. process the signal on the server side
  6. send some response back to the user.

There are several solution for Voice Activity Detection in Java,C#, and other high level languages I presume. However, I wish this part would to be done on the Client side (otherwise, I ll have to send too much data from the client to the server which is highly inefficient) I.E in javascript and HTML5.

I m not an experienced web developer, so my questions are: Is this feasible? Is there a library for that (I haven t found any)? What would be the best approach in approaching the problem?

问题回答

这里有一只冰 v,有浏览器支持:

https://www.npmjs.com/ Package/@ricky0123/vad

You will need to add the CDNs:

<script src="https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ricky0123/vad/dist/index.browser.js"></script>
<script>
async function startVad(){
      const myvad = await vad.MicVAD.new({
        onFrameProcessed: (probabilities) => {

        },
        onSpeechStart: () => {},
        onVADMisfire: () => {},
        onSpeechEnd: (audio) => {console.log("spoke");},
      })
      myvad.start()

}
startVad();
</script>





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签