Skip to main content

A sounddevice microphone implementation for OVOS

Project description

Description

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.

Install

pip install ovos-microphone-plugin-sounddevice

Configuration

In 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": {}
    }
  }
}

macOS Recommended (Clear Capture)

{
  "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
      }
    }
  }
}

Device Selection

  • 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 device or set "device": "default"

Notes

  • Keep multiplier near 1.0 for the cleanest signal.
  • Increase multiplier only if the microphone is too quiet.
  • If clipping/distortion appears, reduce multiplier below 1.0.
  • If 16000 Hz input is not supported by hardware, the plugin can open the device at native sample rate and resample to 16000 Hz for OVOS.
  • blocksize controls callback cadence; lower values usually improve wakeword responsiveness.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_microphone_plugin_sounddevice-0.0.3a8.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file ovos_microphone_plugin_sounddevice-0.0.3a8.tar.gz.

File metadata

File hashes

Hashes for ovos_microphone_plugin_sounddevice-0.0.3a8.tar.gz
Algorithm Hash digest
SHA256 e67b509b104031f2528010dea163b33b6a16e65c3ba0669a6fbbe3c3c02b48f2
MD5 64b92ff1a1be00c63dcc94637071d6ac
BLAKE2b-256 4797e96df0ce272fbdb5caa4f9a5f039743d960e61fe045c8a820a8e42ca2554

See more details on using hashes here.

File details

Details for the file ovos_microphone_plugin_sounddevice-0.0.3a8-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_microphone_plugin_sounddevice-0.0.3a8-py3-none-any.whl
Algorithm Hash digest
SHA256 8db4aa17daf336c6a7da6fc3da14022a3fb51cfa274c34c617e5b151b74d2fe2
MD5 187843697c3f720a7f448ffe76c44de4
BLAKE2b-256 7e4c90db47ae4a8bc8f6165ba8e394dcdf4ec067992e4985b5b9a5eacf7ff1f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page