On virtual microphones

Welcome to America. Probably the most startling, to put it mildly, thing about job search in America is "phone screening". Essencially, you are supposed to talk to fancy auto-responder, and maybe your recorded speech will be listened by a human afterward. Or not.

It is humilating. In more usual procedures, it takes approximately same time to apply and to reject, but here you waste tens of minutes with no warranty of involvement from another side. I do not know how to fix this social problem, so here is something I tried to do from technical side.

Feeding pre-recorded audiofile to microphone is harded then I thought. Really, I expected it to be as simple as

$ cat record.wav > /dev/microphone

It is not. The best thing I found is ALSA virtual microphone. Create named fifo `/tmp/fifo` and following `~/.asoundrc`:

pcm.foo {
    type file
    format "wav"
    slave.pcm "default"
    file '/dev/null'
    infile '/tmp/fifo'

Now, if you output wav file with bitrate 8000 Hz, Mono, sample size of 8 bit to `/tmp/fifo`, it can be recovered by `arecord -Dfoo`.

There is little practical use of this, though, since neither Firefox nor Chromium provide option to use this virtual microphone on microphone-acessing websites. If you know how to make browser to use virtual microphone, please email me!

Another approach to phone screening automation would be feeding audiofile to phone call on Android. Quick web search have shown that is even less likely to succeed: microphone output is not processed by operating system during regular calls, changing this would require significant kernel modifications.

So, best thing I found is low-tech solution: have two devices, one to do phone call and another to play recorded audio. Quality suffers, but it is still automation.

Not on best level, sure. *Feci quod potui, faciant meliora potentes*.