fix: chatbot support agent (#2201)

This commit is contained in:
Joel
2024-01-25 14:53:52 +08:00
committed by GitHub
parent 98660e1f97
commit 301e0496ff
4 changed files with 195 additions and 38 deletions

View File

@@ -3,9 +3,11 @@ import MPEGMode from 'lamejs/src/js/MPEGMode'
import Lame from 'lamejs/src/js/Lame'
import BitStream from 'lamejs/src/js/BitStream'
(window as any).MPEGMode = MPEGMode
;(window as any).Lame = Lame
;(window as any).BitStream = BitStream
if (globalThis) {
(globalThis as any).MPEGMode = MPEGMode
;(globalThis as any).Lame = Lame
;(globalThis as any).BitStream = BitStream
}
export const convertToMp3 = (recorder: any) => {
const wav = lamejs.WavHeader.readHeader(recorder.getWAV())