Git Product home page Git Product logo

Comments (7)

xiangyuecn avatar xiangyuecn commented on May 25, 2024

可以,buffers[buffers.length-1]就是当前从浏览器接收到的pcm原始数据。

这个音频的采样率一般是48000,单声道,1秒接近48k数据,目测要压缩一下😂

from recorder.

shanliangmaoxian avatar shanliangmaoxian commented on May 25, 2024

我后台接收 buffer 通过io 生成 wav文件 生成后的文件 不能打开 是为什么呢

from recorder.

xiangyuecn avatar xiangyuecn commented on May 25, 2024

参考wav文件生成代码,自己研究一下:

for (var i=0;i<size;i++,offset+=2){
data.setInt16(offset,res[i],true);
};

  1. 确保浏览器端发送出来的数据 和 后端接收到的数据 的一致性
  2. 验证浏览器端的数据能够生成有效的wav文件
  3. 验证后端能把数据封装成有效的wav文件

from recorder.

shanliangmaoxian avatar shanliangmaoxian commented on May 25, 2024

前端生成wav有效, buffer数据也是一直的 难道要 把pcm转为 wav格式的 给后台

from recorder.

xiangyuecn avatar xiangyuecn commented on May 25, 2024

可以尝试一下,不过目测作用不大

from recorder.

shanliangmaoxian avatar shanliangmaoxian commented on May 25, 2024

试过了 没有用 为什么 前台 ok 后台 实时接收buffer 生成 wav就不行 尴尬~

from recorder.

xiangyuecn avatar xiangyuecn commented on May 25, 2024

😢😢😂

from recorder.

Related Issues (20)

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.