2026-03-02T07-57-05_auto_memory/memories.db-wal, memory/memories.db-wal, me
This commit is contained in:
parent
f0a465851e
commit
fc108592f0
Binary file not shown.
Binary file not shown.
Binary file not shown.
5
tools/meeting-notes/dist/index.js
vendored
5
tools/meeting-notes/dist/index.js
vendored
@ -1,6 +1,7 @@
|
||||
import 'dotenv/config';
|
||||
import { Client, GatewayIntentBits, ChannelType, Events } from 'discord.js';
|
||||
import { joinVoiceChannel, EndBehaviorType } from '@discordjs/voice';
|
||||
import prism from 'prism-media';
|
||||
import { writeFile } from 'fs/promises';
|
||||
import { existsSync, mkdirSync, unlinkSync } from 'fs';
|
||||
import { resolve, dirname } from 'path';
|
||||
@ -196,12 +197,14 @@ class MeetingNotesBot {
|
||||
subscribeToUser(receiver, userId, userName) {
|
||||
if (!this.activeSession)
|
||||
return;
|
||||
const audioStream = receiver.subscribe(userId, {
|
||||
const opusStream = receiver.subscribe(userId, {
|
||||
end: {
|
||||
behavior: EndBehaviorType.AfterSilence,
|
||||
duration: 2000,
|
||||
},
|
||||
});
|
||||
const decoder = new prism.opus.Decoder({ rate: 48000, channels: 2, frameSize: 960 });
|
||||
const audioStream = opusStream.pipe(decoder);
|
||||
audioStream.on('data', (chunk) => {
|
||||
const buffers = this.audioBuffers.get(userId) || [];
|
||||
buffers.push(chunk);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user