<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div>Hi,<br></div><div><br></div><div>My goal is to record sound from my microphone in a container (for use with Kaldi / DragonFly / Caster) on MacOS.<br></div><div><br></div><div>I've installed and activated pulseaudio on MacOS via<br></div><div><br></div><div>```<br></div><div>brew install pulseaudio<br></div><div>brew services start pulseaudio<br></div><div>```<br></div><div><br></div><div>I can successfully do<br></div><div>```<br></div><div>paplay <some_example>.wav<br></div><div>```<br></div><div>which audibly plays it back.<br></div><div><br></div><div>I can also do<br></div><div>```<br></div><div>parec -d Channel_1__Channel_2.2.monitor test.wav<br></div><div>```<br></div><div>during the playback and afterwards listen to it with<br></div><div>```<br></div><div>pacat test.wav<br></div><div>```<br></div><div>(which plays back part of the original <some_example>.wav).<br></div><div><br></div><div>I can also successfully play audio from the container after enabling the tcp module and pointing the container to the host IP (with PULSE_SERVER env var): `pactl load-module module-native-protocol-tcp auth-anonymous=1`.<br></div><div><br></div><div><br></div><div>However, microphone input does not seem to work:<br></div><div>```<br></div><div>parec -d Channel_1__Channel_2 test.wav<br></div><div>pacat test.wav<br></div><div>```<br></div><div>This yields no audible sound (though I've been rather noisy myself during recording..).<br></div><div><br></div><div><br></div><div>`sox` seems to do the job:<br></div><div>```<br></div><div>sox -d test.wav<br></div><div>paplay test.wav<br></div><div>```<br></div><div>-> Great, I can hear myself!!<br></div><div><br></div><div>But why does the PulseAudio source not work? : /<br></div><div><br></div><div>The sources list shows:<br></div><div>```<br></div><div>> pactl list sources <br></div><div>Source #0<br></div><div> State: SUSPENDED<br></div><div> Name: Channel_1__Channel_2<br></div><div> Description: Built-in Microphone<br></div><div> Driver: module-coreaudio-device.c<br></div><div> Sample Specification: float32le 2ch 44100Hz<br></div><div> Channel Map: front-left,front-right<br></div><div> Owner Module: 6<br></div><div> Mute: no<br></div><div> Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB<br></div><div> balance 0.00<br></div><div> Base Volume: 65536 / 100% / 0.00 dB<br></div><div> Monitor of Sink: n/a<br></div><div> Latency: 0 usec, configured 0 usec<br></div><div> Flags: HARDWARE DECIBEL_VOLUME LATENCY<br></div><div> Properties:<br></div><div> device.string = "Built-in Microphone"<br></div><div> device.product.name = "Built-in Microphone"<br></div><div> device.description = "Built-in Microphone"<br></div><div> device.access_mode = "mmap"<br></div><div> device.class = "sound"<br></div><div> device.api = "CoreAudio"<br></div><div> device.buffering.buffer_size = "4096"<br></div><div> device.vendor.name = "Apple Inc."<br></div><div> device.icon_name = "audio-card"<br></div><div> Formats:<br></div><div> pcm<br></div><div><br></div><div>Source #1<br></div><div> State: SUSPENDED<br></div><div> Name: Channel_1__Channel_2.2.monitor<br></div><div> Description: Monitor of Built-in Output<br></div><div> Driver: module-coreaudio-device.c<br></div><div> Sample Specification: float32le 2ch 44100Hz<br></div><div> Channel Map: front-left,front-right<br></div><div> Owner Module: 7<br></div><div> Mute: no<br></div><div> Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB<br></div><div> balance 0.00<br></div><div> Base Volume: 65536 / 100% / 0.00 dB<br></div><div> Monitor of Sink: Channel_1__Channel_2.2<br></div><div> Latency: 0 usec, configured 0 usec<br></div><div> Flags: DECIBEL_VOLUME LATENCY<br></div><div> Properties:<br></div><div> device.description = "Monitor of Built-in Output"<br></div><div> device.class = "monitor"<br></div><div> device.string = "Built-in Output"<br></div><div> device.icon_name = "audio-card"<br></div><div> Formats:<br></div><div> pcm<br></div><div>```<br></div><div><br></div><div>Any hints on where I might take a deeper look into?<br></div><div><br></div> </body>
</html>