Skip to main content

Reader and utilities for multi-sensor OpenEarable recordings.

Project description

Open Wearable

Python toolkit for parsing and analyzing multi-sensor OpenEarable recordings.

Installation

pip install open-wearables

For local development:

git clone https://github.com/OpenEarable/open-earable-python.git
cd open-earable-python
python -m venv .venv
source .venv/bin/activate
pip install -e .

Quick Example

from open_wearables import SensorDataset

dataset = SensorDataset("recording.oe")

# Combined time-indexed DataFrame of all parsed sensors
df = dataset.get_dataframe()

# Per-sensor views
imu_df = dataset.imu.df
ppg_red = dataset.ppg["ppg.red"]
audio_df = dataset.get_audio_dataframe()

IPC WebSocket Example

import asyncio
from open_wearables import OpenWearableIPCClient


async def main() -> None:
    async with OpenWearableIPCClient() as client:
        await client.start_scan()
        devices = await client.get_discovered_devices()
        wearable = client.wearable(devices[0].id)

        await wearable.connect()
        await wearable.actions.synchronize_time()

        sensors = await wearable.actions.list_sensors()
        stream = await wearable.streams.sensor_values(sensor_id=sensors[0].sensor_id)
        async for event in stream:
            print(event.data)
            break
        await stream.close()


asyncio.run(main())

IPC Audio Example

import asyncio
from open_wearables import OpenWearableIPCClient


async def main() -> None:
    async with OpenWearableIPCClient("ws://192.168.1.23:8765/ws") as client:
        await client.audio.store_sound_file("beep_ok", "beep.wav", codec="wav")
        await client.audio.play_sound("beep_ok", volume=1.0, codec="wav")


asyncio.run(main())

Documentation

Package Architecture

The library is organized into focused layers:

  • open_wearables.schema: sensor schema types and default schema builders.
  • open_wearables.parsing: stream parsing, payload parsers, and microphone helpers.
  • open_wearables.data: high-level dataset API (SensorDataset) and sensor accessors.
  • open_wearables.ipc: asynchronous WebSocket IPC client and protocol models.

Legacy flat modules (open_wearables.scheme, open_wearables.parser, open_wearables.dataset) remain available as compatibility facades.

License

MIT. See LICENSE.

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

open_wearables-0.2.1.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

open_wearables-0.2.1-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file open_wearables-0.2.1.tar.gz.

File metadata

  • Download URL: open_wearables-0.2.1.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for open_wearables-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e37910a9af739b7b309ced7748156cc17710e29c7b98b81ad13112ecc0066792
MD5 000bff7a5ac6e9864c933f198b5c70d0
BLAKE2b-256 e5488f37970f158c325f0f65311ae0825c956441f538bbe02bdb6874244936f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_wearables-0.2.1.tar.gz:

Publisher: publish-pypi.yml on OpenEarable/open-earable-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file open_wearables-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: open_wearables-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for open_wearables-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d76dcfd26fb7dbfb344e21b8d19726f6a7cc036525c24ae9ee626e9648c6b194
MD5 be4939ac427ae084dd5b576c441e8fc1
BLAKE2b-256 90b04c10b9417d950b2a35fccdc8b8418504d9e41801a791b40ae14fe731d4e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_wearables-0.2.1-py3-none-any.whl:

Publisher: publish-pypi.yml on OpenEarable/open-earable-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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