Skip to main content

Rhasspy PyAudio Hermes MQTT Service

Continous Integration GitHub license

Records audio from PyAudio and publishes WAV chunks according to the Hermes protocol.

Running With Docker

$ docker run -it rhasspy/rhasspy-microphone-pyaudio-hermes:<VERSION> <ARGS>

Building From Source

Clone the repository and create the virtual environment:

$ git clone https://github.com/rhasspy/rhasspy-microphone-pyaudio-hermes.git
$ cd rhasspy-microphone-pyaudio-hermes
$ ./configure --enable-in-place
$ make
$ make install

Run the rhasspy-microphone-pyaudio-hermes script to access the command-line interface:

$ ./rhasspy-microphone-pyaudio-hermes --help

Building the Docker Image

Run scripts/build-docker.sh with a local docker registry:

$ DOCKER_REGISTRY=myregistry:12345 scripts/build-docker.sh

Requires Docker Buildx. Set PLATFORMS environment to only build for specific platforms (e.g., linux/amd64).

This will create a Docker image tagged rhasspy/rhasspy-microphone-pyaudio-hermes:<VERSION> where VERSION comes from the file of the same name in the source root directory.

NOTE: If you add things to the Docker image, make sure to whitelist them in .dockerignore.

Command-Line Options

usage: rhasspy-microphone-pyaudio-hermes [-h] [--list-devices]
                                         [--device-index DEVICE_INDEX]
                                         [--sample-rate SAMPLE_RATE]
                                         [--sample-width SAMPLE_WIDTH]
                                         [--channels CHANNELS]
                                         [--output-site-id OUTPUT_SITE_ID]
                                         [--udp-audio-host UDP_AUDIO_HOST]
                                         [--udp-audio-port UDP_AUDIO_PORT]
                                         [--host HOST] [--port PORT]
                                         [--username USERNAME]
                                         [--password PASSWORD]
                                         [--site-id SITE_ID] [--debug]
                                         [--log-format LOG_FORMAT]

optional arguments:
  -h, --help            show this help message and exit
  --list-devices        List available input devices
  --device-index DEVICE_INDEX
                        Index of microphone to use
  --sample-rate SAMPLE_RATE
                        Sample rate of recorded audio in hertz (e.g., 16000)
  --sample-width SAMPLE_WIDTH
                        Sample width of recorded audio in bytes (e.g., 2)
  --channels CHANNELS   Number of channels in recorded audio (e.g., 1)
  --output-site-id OUTPUT_SITE_ID
                        If set, output audio data to a different site id
  --udp-audio-host UDP_AUDIO_HOST
                        Host for UDP audio (default: 127.0.0.1)
  --udp-audio-port UDP_AUDIO_PORT
                        Send raw audio to UDP port outside ASR listening
  --host HOST           MQTT host (default: localhost)
  --port PORT           MQTT port (default: 1883)
  --username USERNAME   MQTT username
  --password PASSWORD   MQTT password
  --site-id SITE_ID     Hermes site id(s) to listen for (default: all)
  --debug               Print DEBUG messages to the console
  --log-format LOG_FORMAT
                        Python logger format

Download files

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

Source Distribution

rhasspy-microphone-pyaudio-hermes-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

File details

Details for the file rhasspy-microphone-pyaudio-hermes-0.1.1.tar.gz.

File metadata

  • Download URL: rhasspy-microphone-pyaudio-hermes-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for rhasspy-microphone-pyaudio-hermes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3c51dd8acc4c334aaf6beaa6edff18a0de426e6076d649d2e008586e4e9274cd
MD5 a9ed86e509c3c159af6c0d481ffb68d7
BLAKE2b-256 a6cc566ce93d37fa8d0c496f1d9005da828c6fde1f466237def412dfd7f83d0a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1

1 file

0.3.0

1 file

0.2.0

1 file

This release

0.1.1 This release

1 file

Supported by

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