There was an article in The Perl Journal about creating an IP telephone in 74 lines of perl:
http://www.samag.com/documents/s=1272/sam05030002/

I was considering expanding this code to include a nice GUI (either with Tk, Win32::GUI, or maybe even Wx),the problem that I am faced with now is how the heck can perl grab data from a microphone under Windows?

I'm thinking it might be neccesary to use Win32::API and do some funky dll calls, but I'm not familiar with the Windows API.

Is there a magic microphone device in windows like LPT1 and COM1?

I imagine that might not be too difficult to write a stand-alone exe that can open the mic and stream wav data, that way perl can do a nice open(MIC, "| mic.exe")


In reply to recording sound with perl under win32? by deadkarma

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.