Merge branch 'main' of interstellardevelopment.org:sageTheDm/interstellar_ai

This commit is contained in:
sageTheDM 2024-09-30 07:49:48 +02:00
commit ca35ab1d04

View file

@ -198,20 +198,6 @@ const InputOutputBackend: React.FC = () => {
}
}
const convertOggToWav = async (oggFile: File | Blob) => {
await loadFFmpeg()
const ffmpeg = ffmpegRef.current!
await ffmpeg.writeFile("input.ogg", await fetchFile(oggFile))
await ffmpeg.exec(["-i", "input.ogg", "output.wav"])
const wavData = await ffmpeg.readFile("output.wav")
console.log(wavData);
const wavBlob = new Blob([wavData], { type: "audio/wav" })
audioRef.current = URL.createObjectURL(wavBlob)
return wavBlob
}
const stopRecording = () => {
mediaRecorderRef.current?.stop()
setIsRecording(false)