GithubHelp home page GithubHelp logo

遇到amr音频时,当xhr.response返回的是audio/amr-wb时decode 解析报错,audio/amr 解析正常 about benz-amr-recorder HOT 5 CLOSED

benzleung avatar benzleung commented on August 25, 2024
遇到amr音频时,当xhr.response返回的是audio/amr-wb时decode 解析报错,audio/amr 解析正常

from benz-amr-recorder.

Comments (5)

changetheworldOuO avatar changetheworldOuO commented on August 25, 2024

请问 后续有打算支持 amr-wb 吗?

from benz-amr-recorder.

BenzLeung avatar BenzLeung commented on August 25, 2024

@Change-TheWorld 我还以为在有生之年都不会遇到 amr-wb 的应用场景……[捂脸]
是否方便告诉我你们的应用场景?如果场景确实广泛,我就想想办法支持(但是我有拖延症可能时间比较长)。

如果你要修改源码,直接修改 BenzAMRRecorder.js 也是可以的,但是更好的办法是整个项目拉下来,修改 src 目录的源码,然后在命令行执行 npm run build 生成新的 BenzAMRRecorder.js

from benz-amr-recorder.

changetheworldOuO avatar changetheworldOuO commented on August 25, 2024

@Change-TheWorld 我还以为在有生之年都不会遇到 amr-wb 的应用场景……[捂脸]
是否方便告诉我你们的应用场景?如果场景确实广泛,我就想想办法支持(但是我有拖延症可能时间比较长)。

如果你要修改源码,直接修改 BenzAMRRecorder.js 也是可以的,但是更好的办法是整个项目拉下来,修改 src 目录的源码,然后在命令行执行 npm run build 生成新的 BenzAMRRecorder.js

我们的客户端里的音频,都是由客户端的录音功能,而累积起来的音频数据,由amr和aac两种格式,amr里,宽带和窄带的数据比大约是一半一半,因此对于我们这个业务场景, 对 amr-wb 可以说是迫在眉睫的

from benz-amr-recorder.

BenzLeung avatar BenzLeung commented on August 25, 2024

你们的场景是使用js来开发客户端吗?目前在 github 上,确实有个使用 js 编写的 amr-wb 的解码器:https://github.com/sblandford/amrwb-js 但是暂时没有编码器。用这个解码器实现 amr-wb 的播放应该不成问题。
实际上,我这个项目主要解决微信的录音API所得到的amr音频在其他场景的互通问题,微信的录音文件都是 amr-nb 格式。目前本项目压缩后js文件尺寸是 500KB,如果再集成 amr-wb 估计要800K-1M了,所以暂时不考虑实现。

from benz-amr-recorder.

BenzLeung avatar BenzLeung commented on August 25, 2024

https://github.com/AcoWaves/benz-amr-recorder 发现你自行实现了耶~ @Change-TheWorld 感谢感谢。那么这边先close啦。建议及时更新我的新代码。

from benz-amr-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.