How to draw a graph of sounds during recording in java sound?

I successfully record java sounds from my microphone and can draw the recorded wave file as in the attached image. (I tried to download the image from here a lot, but it fails every time. I also used tinypic, but could not upload, I think there is some error in my internet connection, I will upload it later here.)

I also attach all my code. http://pastebin.com/EgW2ZcyJ

Now, my question is that I want to display graphs for sound while recording in real time. So if I try to read the audio input stream, which is used when recording in a new stream, and sleep this stream for 1 second until the recording is complete. but in this approach it gives a frame length of -1, so nothing can be done.

, since I can draw a graph, since I can get frames of the recorded sound [bytes from the audio input stream] during real-time recording, so I can use it to draw a graph using it in different streams, so I can simulate exactly which window sound recorder provides

Thanks Mihir Pareh

+1
source share
1 answer

This uses JFreeChart to display the latest changes in a time-based series.

Sorry, but you do not understand my question.

Addedndum: you can change your question to clarify; it will also help identify future answers. In the meantime, you can adapt TeeOutputStream to intercept the OutputStream from AudioSystem.write() .

image

+2
source

Source: https://habr.com/ru/post/927665/


All Articles