Closed Pudochu closed 1 year ago
Hello, you can get raw PCM audio encoded to base64 like this:
client.on("speech", (msg) => {
const rawAudioAsBase64 = msg.audioBuffer.toString("base64");
});
In case you want to play it in the browser on send to some API I added function to get wav data encoded as base64 (available in 3.2.0 version):
client.on("speech", (msg) => {
const wavEncodedAsBase64 = msg.getWavEncodedToBase64Audio();
});
Is this what you want?
Hello, This is what I was looking for! I'm grateful for your help! Thanks so much.
client.on("speech", (msg) => {
const wavEncodedAsBase64 = msg.getWavEncodedToBase64Audio();
});
However, when I convert it to wav file, the sound is robotic and in slow motion.
Sincerely, Pudochu.
Hello, i fixed.
VoiceMessage.audioBufferFormat = {
sampleRate: 48000,
frameSize: 960,
channels: 2,
};
Hello,
First of all, your module and project are very cool. I am using discord.js@v14 module and discord-speech-recognition latest version.
My problem is is there any way I can get "audio base64" data with speech client event?
Kind regards, Pudochu.