debug: ajout logs diagnostic format audio LiveKit

Affiche sampleRate, channels, buffer type et premiers bytes
pour diagnostiquer le bruit audio
This commit is contained in:
2026-05-28 15:28:28 +02:00
parent 1941e9c8a1
commit 5534a43b0a
2 changed files with 75 additions and 36909 deletions
+11
View File
@@ -372,6 +372,17 @@ export class AudioBridge extends EventEmitter {
// Réception audio depuis les clients LiveKit de ce groupe // Réception audio depuis les clients LiveKit de ce groupe
client.on('audioData', ({ participantName, pcmData, sampleRate, channels }) => { client.on('audioData', ({ participantName, pcmData, sampleRate, channels }) => {
// Log premier frame pour diagnostic
if (!this._firstFrameLogged) {
console.log(`🔍 Diagnostic audio LiveKit:
sampleRate: ${sampleRate}
channels: ${channels}
buffer size: ${pcmData.length} bytes
buffer type: ${pcmData.constructor.name}
first 10 bytes: [${Array.from(pcmData.slice(0, 10)).join(', ')}]`);
this._firstFrameLogged = true;
}
// Router vers le bon groupe // Router vers le bon groupe
this.emit('groupAudioIn', { groupName: groupId, pcmBuffer: pcmData }); this.emit('groupAudioIn', { groupName: groupId, pcmBuffer: pcmData });
}); });
File diff suppressed because one or more lines are too long