try pcm codec

This commit is contained in:
n8fr8 2021-12-06 09:37:59 -05:00
parent 3e38c2c7e4
commit b2e5f132b3

View file

@ -330,8 +330,8 @@ export default {
startRecording() { startRecording() {
var constraints = { var constraints = {
audio: { audio: {
channelCount: 1, // channelCount: 1,
sampleRate: 16000, // sampleRate: 16000,
echoCancellation: false, echoCancellation: false,
autoGainControl: true, autoGainControl: true,
noiseSuppression: true, noiseSuppression: true,
@ -344,7 +344,7 @@ export default {
.then((stream) => { .then((stream) => {
this.recorder = RecordRTC(stream, { this.recorder = RecordRTC(stream, {
type: "audio", type: "audio",
mimeType: "audio/webm", mimeType: "audio/webm;codecs=pcm",
}); });
this.recorder.startRecording(); this.recorder.startRecording();
this.state = State.RECORDING; this.state = State.RECORDING;