Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Description

This plugin lets OpenVoiceOS (OVOS) capture microphone audio through python-sounddevice.

python-sounddevice uses PortAudio to talk to audio hardware. PortAudio is a free, cross-platform, open-source audio I/O library. It works in C or C++ on Windows, macOS, and Unix (OSS/ALSA).

The plugin works best on macOS (Intel and Apple Silicon) and also runs on Linux. On macOS it uses CoreAudio stream settings tuned for clear wake-word and speech-to-text (STT) capture.

Install

pip install ovos-microphone-plugin-sounddevice

Configuration

The listener defaults to the ovos-microphone-plugin-alsa plugin. To use this plugin instead, update the mycroft.conf configuration file:

{
  "listener": {
    "microphone": {
      "module": "ovos-microphone-plugin-sounddevice",
      "ovos-microphone-plugin-sounddevice": {}
    }
  }
}

macOS recommended settings (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

Set device to one of these forms:

  • 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.
  • Reduce multiplier below 1.0 if clipping or distortion appears.
  • If the hardware does not support 16000 Hz input, the plugin can open the device at its native sample rate and resample to 16000 Hz for OVOS.
  • blocksize controls callback cadence. Lower values usually improve wake-word responsiveness.

Related projects

License

Apache-2.0, see LICENSE.

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.3a9.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.3a9.tar.gz.

File metadata

File hashes

Hashes for ovos_microphone_plugin_sounddevice-0.0.3a9.tar.gz
Algorithm Hash digest
SHA256 408d6616cc00c89331b09b8ba5609dd7fdc4f4bbca04d1f4051020b248b58579
MD5 c85814f672077d8ecadb55f5cfc2e4eb
BLAKE2b-256 1dab2a2bac37391ee4dd359fa1077d8514980fc72a65215f773c20026ff61bf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ovos_microphone_plugin_sounddevice-0.0.3a9-py3-none-any.whl
Algorithm Hash digest
SHA256 3645eb79cf4ed1104137e37c34d039b6ccedd000c757f149dcc6a45e42fa302a
MD5 7e1e52c7d2627d928aa0875b83cb241f
BLAKE2b-256 8f0dcc2dbbc9e1f01082c244e80936f48f2c851a464f235d5f0411663e7ea9f6

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3a9 This release

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

Supported by

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