record and play audio
I am trying to do https://github.com/discordjs/voice-examples/blob/main/recorder/src/createListeningStream.ts in v14
with this code:
I either cannot record correctly or I cannot play back correctly. I think I need the params to play back the file, or how to convert to a usable file.
basicly do you know where I can get those for this setup because neither primsmedia docs nor the djs docs explain stuff
what try to play the file that doesnt work:
cat <file> | ffmpeg -f s16le -ar 48000 -ac 2 -i pipe:0 -acodec pcm_s16le -ar 48000 -ac 2 -f wav - | ffplay -
sample recording attachedGitHub
voice-examples/recorder/src/createListeningStream.ts at main ยท disc...
A collection of examples of how to use @discordjs/voice in your projects - discordjs/voice-examples
2 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!other details
[email protected]
node v16.16.0
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.16.0
- prism-media: 1.3.5
Opus Libraries
- @discordjs/opus: 0.9.0
- opusscript: not found
Encryption Libraries
- sodium-native: not found
- sodium: 3.0.2
- libsodium-wrappers: not found
- tweetnacl: not found
FFmpeg
- version: 4.2.3
- libopus: yes
--------------------------------------------------