java-speech-api icon indicating copy to clipboard operation
java-speech-api copied to clipboard

Error Selecting Microphone

Open PintsizedSix40 opened this issue 7 years ago • 1 comments

Hi, I have a problem with the microphone selection GUI. When I ran it, I added this line try { main.mic.setTargetDataLine((TargetDataLine) AudioSystem.getLine(mixer.getLineInfo())); } catch (LineUnavailableException e) { // TODO Auto-generated catch block e.printStackTrace(); } Right before the break; in ActionListener, and it would be really great if I could get it working! Also, I get the same error when using the other examples, and selecting from there, and when I get the line of the selected microphone vs the one grabbed from the microphone var, they are different.

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: No line matching interface Mixer is supported. at javax.sound.sampled.AudioSystem.getLine(Unknown Source) at com.PintsizedSix40.main.MicrophonePanel$1.actionPerformed(MicrophonePanel.java:63) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.JToggleButton$ToggleButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

PintsizedSix40 avatar Apr 26 '18 09:04 PintsizedSix40

Try https://github.com/goxr3plus/java-google-speech-api

goxr3plus avatar Apr 30 '19 22:04 goxr3plus