Coder Social home page Coder Social logo

877325778 / voicedictation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from muguilin/voicedictation

0.0 0.0 0.0 1.16 MB

迅飞 语音听写 WebAPI - 把语音(≤60秒)转换成对应的文字信息,让机器能够“听懂”人类语言,相当于给机器安装上“耳朵”,使其具备“能听”的功能。

JavaScript 68.55% CSS 17.13% HTML 14.32%

voicedictation's Introduction

迅飞 -WebAPI 版 语音听写

功能简介:

  • 把语音(≤60秒)转换成对应的文字信息,让机器能够“听懂”人类语言,相当于给机器安装上“耳朵”,使其具备“能听”的功能。
  • 语音听写流式接口,用于1分钟内的即时语音转文字技术,支持实时返回识别结果,达到一边上传音频一边获得识别文本的效果。
  • 该语音能力是通过Websocket API的方式给开发者提供一个通用的接口。
  • Websocket API具备流式传输能力,适用于需要流式数据传输的AI服务场景,比如边说话边识别。
  • 相较于SDK,WebAPI具有轻量、跨语言的特点;相较于HTTP API,Websocket API协议有原生支持跨域的优势。
  • 语音听写流式WebAPI 服务,热词使用方式:登陆迅飞开放平台后,找到控制台--我的应用---语音听写---个性化热词,上传热词。

运行过程:

  1. websocket连接:判断浏览器是否兼容,获取websocket url并连接,这里为了方便本地生成websocket url。

  2. 获取浏览器录音权限:判断浏览器是否兼容,获取浏览器录音权限。

  3. 通过js获取浏览器录音数据。

  4. 将录音数据处理为文档要求的数据格式:采样率16k或8K、位长16bit、单声道;该操作属于纯数据处理,使用webWork处理。

  5. 根据要求(采用base64编码,每次发送音频间隔40ms,每次发送音频字节数1280B)将处理后的数据通过websocket传给服务器。

  6. 实时接收websocket返回的数据并进行处理。

使用说明:

实例效果:

image image

voicedictation's People

Contributors

muguilin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.