摘要: 1. 使用npm已有包 安装包:npm install audiobuffer-to-wav --save 用例: var toWav = require('audiobuffer-to-wav') var xhr = require('xhr') var context = new AudioCo 阅读全文
posted @ 2020-08-19 21:24 Shaw_喆宇 阅读(3130) 评论(0) 推荐(0) 编辑
摘要: 1. 参考Audio-Resampler // 调用audioBufferToWav import { audioBufferToWav } from "./audiobuffer-to-wav"; const getArrayBuffer = (url: string): Promise<Arra 阅读全文
posted @ 2020-08-19 21:19 Shaw_喆宇 阅读(864) 评论(0) 推荐(0) 编辑
摘要: 问题:导入resampler时报错 官网:resampler = require('audio-resampler'); 自己写的:import { resampler } from "audio-resampler"; 解决: 因为这是一个比较老的npm包,不支持上面的那种导入方式。 修改成: i 阅读全文
posted @ 2020-08-19 16:32 Shaw_喆宇 阅读(807) 评论(0) 推荐(0) 编辑