Jda: Getting inputstream from the audio in a voice channel?

Created on 17 Jul 2016  路  4Comments  路  Source: DV8FromTheWorld/JDA

How would i go about getting an inputstream from the audio in a voice channel

experienced enhancement up for grabs

Most helpful comment

In JDA 3.0 I'm considering creating an implementation of AudioReceiveHandler that would allow you to retrieve an AudioInputStream. Be on the lookout for that when it comes out.

All 4 comments

In JDA 3.0 I'm considering creating an implementation of AudioReceiveHandler that would allow you to retrieve an AudioInputStream. Be on the lookout for that when it comes out.

Is this still a thing? And could someone show me how to build an AudioInputStream with the help of the AudioReceiveHandler?

@AutismSpeaks @Panzer1119
I am working on an InputStream wrapper for Channel objects (including VoiceChannels).
If you want to try that, here: https://github.com/BenjaminUrquhart/CIO

How would an AudioInputStream work? One can only create an AudioInputStream instance when its length (count of sample frames) is already known. This means that you can only store a fixed length of audio in an AudioInputStream, it can't be a real stream as in one that is going to receive new data constantly. It might still be useful to provide AudioInputStream instances though, it would just have to have a specified length and would need a handler that takes these instances. (Think about how some recording software works: they save multiple files of a fixed length. Each AudioInputStream here would represent a file.)

A normal InputStream might be more useful, but I am not familiar with what today's Java voice recognition, real-time processing libraries take as an input.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

napstr picture napstr  路  3Comments

Mas281 picture Mas281  路  3Comments

hitsu420 picture hitsu420  路  6Comments

sachinhasaphatass picture sachinhasaphatass  路  3Comments

liovy picture liovy  路  3Comments