0

I am using .NET 3.5.

I need to Capture Sound from Mic/Headphone and trigger action at particular (not exact) frequency (Need to perform some action when player hits ball with stick while playing golf).

So,
1. How to capture sound from Mic/Headphone using .NET 3.5?
2. Trigger action at particular (not exact) frequency?

Any ideas?

Chintan Shah
  • 373
  • 1
  • 2
  • 16
  • Found one good sample at: http://voicerecorder.codeplex.com/. Its exactly what I want. But written in WPF. Does anyone have same sample (measuring frequency while recording) written in .NET 3.5 (without WFP)? – Chintan Shah Mar 30 '10 at 10:48

1 Answers1

3

For (2) I suggest the Goertzel algorithm, which is very simple to implement and will allow you to detect energy in a narrow range of frequencies.

Paul R
  • 208,748
  • 37
  • 389
  • 560