Henry
Henry

Reputation: 332

Code to read data from microphone and detect DTMF tones

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.

Upvotes: 2

Views: 2103

Answers (1)

user1445967
user1445967

Reputation: 1570

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/

Upvotes: 1

Related Questions