Closed SOLR4189 closed 1 year ago
You don't listen to when they speaking stops. Do that to split the files into the chunks you want. currently your stream will just not receive data while they don't speak and then the next data chunk comes when they continue speaking and pipe right after those before.
@Qjuh Could you explain in more details? Do you suggest to subscribe on receiver.speaking.on('stop')
? Then what am I supposed to do, append SILENCE buffer until a user starts speaking again or until the EndBehaviorType.AfterSilence
condition is met?
I suggest joining the Discord server for such inquiries, since what you‘re describing is not a bug.
Which package is this bug report for?
discord.js
Issue description
I made a discord bot with Discord.js v14 that records users' audio as individual files. But in these files it sounds like there are no silence gaps in users' speech. The audio sounds like one continuous sentence, and it makes it impossible for people (and STT algorithms) to divide it into comprehensible sentences.
Code sample
voiceConnector.ts:
streamRecorder.ts:
Versions
Issue priority
Medium (should be fixed soon)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Guilds, GuildVoiceStates
I have tested this issue on a development release
No response