VAD stands for voice activity detection. I have a VAD algorithm and it works.
How to make it present itself in the ideology of Java sound API?
My few ideas are:
1) Create TargetDataLine
each time voice detected and allow consumer to handle line creation and read created line.
Not sure if lines are for this.
2) Create AudioInputStream
each time voice detected and allow consumer to handle stream creation and read it.
3) Have one constant TargetDataLine
and send open/start/other events each time voice detected.
Which one is most beautiful?