Marc
Marc
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
Alright, thanks a lot!
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
Am I guaranteed to always get the speaking event first?
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
Alright, I tried using
voiceGateway {
eventFlow = voiceGatewayEvents
}
voiceGateway {
eventFlow = voiceGatewayEvents
}
inside my connect() function and that seems to get me the events. I did the mapping by hand and it seems to work, even if what I did is probably the worst way to do it:
val userSsrcToUserIdMapping = ConcurrentHashMap<UInt, Snowflake>()

voiceConnection.streams
.incomingAudioFrames
.onEach { (userSsrc, audioFrame) ->
val userId = userSsrcToUserIdMapping[userSsrc] ?: run {
voiceGatewayEvents
.filterIsInstance<Speaking>()
.first { it.ssrc == userSsrc }
.userId
.also {
userSsrcToUserIdMapping[userSsrc] = it
}
}
val userSsrcToUserIdMapping = ConcurrentHashMap<UInt, Snowflake>()

voiceConnection.streams
.incomingAudioFrames
.onEach { (userSsrc, audioFrame) ->
val userId = userSsrcToUserIdMapping[userSsrc] ?: run {
voiceGatewayEvents
.filterIsInstance<Speaking>()
.first { it.ssrc == userSsrc }
.userId
.also {
userSsrcToUserIdMapping[userSsrc] = it
}
}
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
Is that just using voiceConnection.voiceGateway.on<Speaking> { }? Doesn't seem to fire for me, is there something I need to configure to get that event?
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
So this UInt is just a number without meaning basically? Or can I map it to a user without much hassle?
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
No description
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
This is what my login looks like
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
No description
23 replies
KKord
Created by Marc on 4/21/2025 in #help
User audio processing only works after rejoin
Oh sorry, didn't get a notification. Technically I only need a unique mapping, I don't think the user is needed for my usage
23 replies
KKord
Created by Marc on 4/9/2023 in #help
Sending a message with an image attachment
Sorry for the late reply, but it does work. It seems like the issue was the size parameter in the ChannelProvider. If I just remove it, it works again. How weird... Thanks anyways.
11 replies