feat: add web interface and WebSocket server for real-time audio transmission to Discord
This commit is contained in:
@@ -139,6 +139,13 @@ export async function startRecording(client: Client, channel: VoiceChannel): Pro
|
||||
// Pipe: audioStream -> packetFilter -> oggStream -> out
|
||||
audioStream.pipe(packetFilter).pipe(oggStream).pipe(out);
|
||||
|
||||
// Also forward to web listeners
|
||||
oggStream.on('data', (chunk) => {
|
||||
if ((global as any).broadcastToWeb) {
|
||||
(global as any).broadcastToWeb(chunk);
|
||||
}
|
||||
});
|
||||
|
||||
if (config.verbose) {
|
||||
console.log(`[recorder] Recording user ${userId} → ${filename}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user