2

All I need is a peice of java code that can detect DTMF from microphone print out the characters to System.out. I've been searching forever and I couldn't find it.

Henry
  • 342
  • 1
  • 2
  • 13

1 Answers1

1

Oracle Docs on Capturing Audio in Java:

http://docs.oracle.com/javase/tutorial/sound/capturing.html

As discussed in Overview of the Sampled Package, a typical audio-input system in an implementation of the Java Sound API consists of:

An input port, such as a microphone port or a line-in port, which feeds its incoming audio data into: A mixer, which places the input data in: One or more target data lines, from which an application can retrieve the data.

(Emphasis Mine)

Also see: Java (J2SE) DTMF tone detection

I think usually this is done in hardware, so you may end up writing code yourself to analyze the audio you've captured.

Also: http://sourceforge.net/projects/java-dtmf/

Community
  • 1
  • 1
user1445967
  • 1,520
  • 4
  • 14
  • 30
  • I've seen all those links while searching, all I need is a block of code that can read data from the microphone, detect all the DTMF tones and print them. – Henry Jan 23 '14 at 00:56
  • 1
    It is good that you are willing to look into the problem yourself. Although, if you are literally asking for the code to be written for you, results vary, but such requests are often unsuccessful on stackoverflow. – user1445967 Jan 23 '14 at 06:50