murpyh
murpyh
DIAdiscord.js - Imagine an app
Created by Digital on 5/29/2024 in #djs-questions
how can we convert downloaded voice messages (ogg) to raw stream?
what for? if you want just to play the audio file, @discordjs/voice can convert .ogg to audio stream when you play an AudioResource
5 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 5/29/2024 in #djs-questions
Streaming .ogg file as it is created
I ended up solving this using the NPM package tailing-stream, which allows you to create ReadableStreams on files that are still being created. I had to switch the output to mp3 for it to work, as the Opus formats error when the stream is first created. Webm gives this:
errored: Error: Did not find the EBML tag at the start of the stream
at WebmDemuxer._readTag (/home/murpyh/nestmind/node_modules/prism-media/src/core/WebmBase.js:113:18)
at WebmDemuxer._transform (/home/murpyh/nestmind/node_modules/prism-media/src/core/WebmBase.js:47:23)
errored: Error: Did not find the EBML tag at the start of the stream
at WebmDemuxer._readTag (/home/murpyh/nestmind/node_modules/prism-media/src/core/WebmBase.js:113:18)
at WebmDemuxer._transform (/home/murpyh/nestmind/node_modules/prism-media/src/core/WebmBase.js:47:23)
Ogg gives this:
errored: Error: capture_pattern is not OggS
at OggDemuxer._readPage (/home/murpyh/nestmind/node_modules/prism-media/src/opus/OggDemuxer.js:61:13)
at OggDemuxer._transform (/home/murpyh/nestmind/node_modules/prism-media/src/opus/OggDemuxer.js:37:29)
errored: Error: capture_pattern is not OggS
at OggDemuxer._readPage (/home/murpyh/nestmind/node_modules/prism-media/src/opus/OggDemuxer.js:61:13)
at OggDemuxer._transform (/home/murpyh/nestmind/node_modules/prism-media/src/opus/OggDemuxer.js:37:29)
I assume this is because header/footer information needed to identify the file isn't generated until the audio is finished, or maybe FFMPEG just handles this better than the @discordjs/voice demuxers. Not ideal but it works.
5 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 5/29/2024 in #djs-questions
Streaming .ogg file as it is created
Thank you for the suggestion. Just realized my server is already on node v19 and I just updated to latest on my development computer.
5 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
thanks for the help
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
okay that's what i was looking for
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
it's blank, i'll try running node index.js from there
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
ah
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
it's the vscode debug console, so presumably a terminal
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
as does dir
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
this is the output from catching it
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
like log it
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
the guide catches the error but doesn't do anything with it
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
(also apologies for posting this in multiple places)
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
that's sort of why i'm not catching it here, i don't know the proper way to log it and it doesn't display in console at all if i keep it like that
22 replies
DIAdiscord.js - Imagine an app
Created by murpyh on 3/17/2023 in #djs-questions
how do i get a description of CombinedPropertyErrors in vscode?
well how exactly the guide just has a try catch block in index.js which replies await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
22 replies