The Big E in Math -> Σ
The Big E in Math -> Σ
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by The Big E in Math -> Σ on 5/26/2024 in #djs-voice
Reduce playing audio latency
Hi, I'm currently trying to convert an incoming audio stream (mulaw) to raw opus bitstream. Using ffmpeg and inputType as raw, I'm able to achieve it, but that introduces 3s of latency. Unfortunately, the incoming stream is real-time data, so this latency has to be reduced. I did manipulate around with ffmpeg, and got it to play a quiet popping noise under 1s (ofc that only happens when the stream audio is very loud). Here's my current ffmpeg setup (which doesn't work). Is there anything else I need to transform in stream for it to work?
// receiveRawStream is the raw mulaw Buffer
ffmpeg(receiveRawStream)
.inputOptions([
"-f mulaw",
"-ar 8000",
"-ac 1"
])
.outputOption([
"-c:a libopus",
"-f ogg",
"-ar 48000",
"-ac 2",
])
.on("error", (err)=>{
console.log(err);
})
.pipe(new opus.OggDemuxer(), {end: false}) // The demuxer is from "prism-media" package
.pipe(receiveffmpegStream);
/// receiveffmpegStream is the final stream before it's piped to createAudioResource (configured with StreamType.Opus)
// receiveRawStream is the raw mulaw Buffer
ffmpeg(receiveRawStream)
.inputOptions([
"-f mulaw",
"-ar 8000",
"-ac 1"
])
.outputOption([
"-c:a libopus",
"-f ogg",
"-ar 48000",
"-ac 2",
])
.on("error", (err)=>{
console.log(err);
})
.pipe(new opus.OggDemuxer(), {end: false}) // The demuxer is from "prism-media" package
.pipe(receiveffmpegStream);
/// receiveffmpegStream is the final stream before it's piped to createAudioResource (configured with StreamType.Opus)
Node Version: 20.12.2 DJS Version: 14.15.2
6 replies
RRailway
Created by The Big E in Math -> Σ on 1/5/2024 in #✋|help
Access internal network VPN
Currently, only one port can be forwarded by the service. In some cases, I want to access another port by the service to either test it or access its web management panel (i.e. rabbitMQ). Since internal network are just a virtual network made by wireguard, would it be possible to access it using the VPN client? Just curious if the VPN is setup in a way that this can be made possible.
8 replies
RRailway
Created by The Big E in Math -> Σ on 12/17/2023 in #✋|help
Obtain git commit hash
Hey, I want to keep track of release version on the release file by using git hash, but railway's CI/CD system doesn't seem to to include .git directory during build process. Is there a way to pull the hash info without needing to run git clone (or calling github API)?
9 replies
RRailway
Created by The Big E in Math -> Σ on 11/14/2023 in #✋|help
Clear dockerfile cache
Hi, I was trying to integrate sleep command before running the source for the internal DNS Resolver to setup. But it seems like it's still using the cached CMD command instead of the newly replaced ENTRYPOINT. Any ways to clear the cache?
23 replies
RRailway
Created by The Big E in Math -> Σ on 11/8/2023 in #✋|help
mTLS Supported?
Hi, I just want to confirm this before implementing it. 1. Can you run an HTTPS server with an self-signed cert over the port (instead of HTTP)? 2. If so, will mTLS work properly over the proxied connection (i.e. client certificate auth)?
11 replies
RRailway
Created by The Big E in Math -> Σ on 7/2/2023 in #✋|help
Application failed to access database
Hey, while I'm trying to run a webapp, the container fails to connect to any databases. Redis shows timeout, while Prisma (PostgreSQL) shows unreachable. But when I run it locally, everything connects.
26 replies
RRailway
Created by The Big E in Math -> Σ on 3/2/2023 in #✋|help
Missing Python Package
Hey, it seems like the NodeJS container does not have Python installed, but some of the dependency requires to be compiled using Python. How would I solve this?
22 replies
DIAdiscord.js - Imagine an app
Created by The Big E in Math -> Σ on 10/21/2022 in #djs-questions
401 error when editing command permission
Hey, when I tried to use bot's token to set command permission, I get 401 error. Am I missing any permission scopes?
guild.commands.permissions.set({
command: "CmDID",
token: config['botToken'],
permissions: commandPermConfig,
})
guild.commands.permissions.set({
command: "CmDID",
token: config['botToken'],
permissions: commandPermConfig,
})
6 replies