Open Voice OS microphone plugin for python-sounddevice library.
python-sounddevice uses PortAudio as audio library to interact with audio components.
PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.
This plugin is ideal for macOS (Intel and Apple Silicon) and also works on Linux. On macOS it uses CoreAudio stream settings tuned for clear wake-word and STT capture.
pip install ovos-microphone-plugin-sounddeviceIn order to inform the listener which plugin to use (default is set to ovos-microphone-plugin-alsa), the mycroft.conf configuration file should be updated.
{
"listener": {
"microphone": {
"module": "ovos-microphone-plugin-sounddevice",
"ovos-microphone-plugin-sounddevice": {}
}
}
}{
"listener": {
"microphone": {
"module": "ovos-microphone-plugin-sounddevice",
"ovos-microphone-plugin-sounddevice": {
"device": "Built-in Microphone",
"latency": "low",
"multiplier": 1.0,
"blocksize": 1024,
"queue_maxsize": 8,
"use_coreaudio_settings": true,
"coreaudio_conversion_quality": "max",
"coreaudio_change_device_parameters": false,
"coreaudio_fail_if_conversion_required": false,
"auto_sample_rate_fallback": true,
"auto_channel_fallback": true,
"auto_latency_fallback": true
}
}
}
}- Exact name:
"device": "Built-in Microphone" - Substring match:
"device": "Built-in" - Regex match:
"device": "regex:^MacBook.*Microphone" - Numeric index:
"device": 0 - Default input device: omit
deviceor set"device": "default"
- Keep
multipliernear1.0for the cleanest signal. - Increase
multiplieronly if the microphone is too quiet. - If clipping/distortion appears, reduce
multiplierbelow1.0. - If
16000 Hzinput is not supported by hardware, the plugin can open the device at native sample rate and resample to16000 Hzfor OVOS. blocksizecontrols callback cadence; lower values usually improve wakeword responsiveness.