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.0.tar.gz (29.4 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.0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_wearables-0.2.0.tar.gz
  • Upload date:
  • Size: 29.4 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.0.tar.gz
Algorithm Hash digest
SHA256 8ba313a5d2b6b5b5c6ec49d21218d13897ce4d34de858209d80b8ec402ccf372
MD5 65403e3729c93b22662c655fe13644c7
BLAKE2b-256 569d8c56b7384ba31b1aa8ac5d0fed103a5ba91f141039215cf9bf97518fcd19

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_wearables-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: open_wearables-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 31.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bff307c350f2c462c71a36ef473ffcb24630ddef09416a4436c71e61f4698458
MD5 5e30c25045ce41141172c2354fd458d7
BLAKE2b-256 d3bbe9a5b2f0c00f814c813fd0a73aca6bed1c69d6124a3decd2d64a837fd214

See more details on using hashes here.

Provenance

The following attestation bundles were made for open_wearables-0.2.0-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