web浏览器录音:web audio api

参考:

  • https://developer.mozilla.org/zh-CN/docs/Web/API/AudioContext/createScriptProcessor
  • https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Using_Web_Audio_API

1. 在录音采样过程中

  采样数 = sample_rate ; 采样大小 = sample_rate * sample_width/8

  如果采样宽度sample_width是paInt16,那么16位整数采样的字节/长度是2字节

  paInt16整形是特定的录音采样数据类型,来自于pyaudio.paInt16;

  在数组数据类型转换时np.int16。 np.fromstring(data, dtype = np.int16)

  frame_duration_ms = 30ms  padding_duration_ms = 300ms

猜你喜欢

转载自blog.csdn.net/qq_33419476/article/details/86622655
今日推荐