roboflex.audio-alsa


Nameroboflex.audio-alsa JSON
Version 0.1.10 PyPI version JSON
download
home_pagehttps://github.com/flexrobotics/roboflex_audio_alsa
SummaryRoboflex Audio input library using ALSA
upload_time2023-12-05 20:50:07
maintainer
docs_urlNone
authorColin Prepscius
requires_python>=3.6
licenseMIT
keywords alsa audio robotics middleware flexbuffers python c++ c++20
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # roboflex.audio_alsa

Support for reading audio data on linux from the Advanced Linux Sound Architecture (ALSA).

## System dependencies

Requires ALSA to be installed. More than likely, it already is installed in your distro. But if not:

    apt-get install libasound2 alsa-utils alsa-oss

## Import

    import numpy
    import roboflex.audio_alsa as raa

## Nodes

There is only one: **AudioSensor**

    # all parameters optional: below are the defaults
    audio_sensor = raa.AudioSensor(
        name = "WebcamSensor",
        channels = 1,
        sampling_rate = 48000,
        capture_frames = 512,
        produce_frames = 1024,
        bit_depth = raa.BitDepth.S16LE,
        device_name = "default",
    )

    # must be started (like all sensors)!
    audio_sensor.start()

## Messages

    from roboflex.audio_alsa import AudioData, AudioData32

API:

    # the timestamp just before reading from device
    message.t0 -> Float

    # the timestamp just after reading from device
    message.t1 -> Float

    # the audio data read from the device
    message.data -> np.array
        shape = [C, P] where C is channels, P is produce_frames
        dtype = np.int16

DYNOFLEX:

    # the timestamp just before reading from device
    message["t0"] -> Double

    # the timestamp just after reading from device
    message["t1"] -> Double

    # the audio data read from the device
    message.data -> np.array
        shape = [C, P] where C is channels, P is produce_frames
        dtype = np.int32

## Other

Available BitDepths:

    enum raa.BitDepth:
        S16LE,
        S24LE,
        S32LE,
        S24_3LE


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/flexrobotics/roboflex_audio_alsa",
    "name": "roboflex.audio-alsa",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "alsa,audio,robotics,middleware,flexbuffers,python,c++,c++20",
    "author": "Colin Prepscius",
    "author_email": "colinprepscius@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/33/12/9335384ae4439df49a92e981919e6bd35168b31c22519dfb194fe38ab8d7/roboflex.audio_alsa-0.1.10.tar.gz",
    "platform": null,
    "description": "# roboflex.audio_alsa\n\nSupport for reading audio data on linux from the Advanced Linux Sound Architecture (ALSA).\n\n## System dependencies\n\nRequires ALSA to be installed. More than likely, it already is installed in your distro. But if not:\n\n    apt-get install libasound2 alsa-utils alsa-oss\n\n## Import\n\n    import numpy\n    import roboflex.audio_alsa as raa\n\n## Nodes\n\nThere is only one: **AudioSensor**\n\n    # all parameters optional: below are the defaults\n    audio_sensor = raa.AudioSensor(\n        name = \"WebcamSensor\",\n        channels = 1,\n        sampling_rate = 48000,\n        capture_frames = 512,\n        produce_frames = 1024,\n        bit_depth = raa.BitDepth.S16LE,\n        device_name = \"default\",\n    )\n\n    # must be started (like all sensors)!\n    audio_sensor.start()\n\n## Messages\n\n    from roboflex.audio_alsa import AudioData, AudioData32\n\nAPI:\n\n    # the timestamp just before reading from device\n    message.t0 -> Float\n\n    # the timestamp just after reading from device\n    message.t1 -> Float\n\n    # the audio data read from the device\n    message.data -> np.array\n        shape = [C, P] where C is channels, P is produce_frames\n        dtype = np.int16\n\nDYNOFLEX:\n\n    # the timestamp just before reading from device\n    message[\"t0\"] -> Double\n\n    # the timestamp just after reading from device\n    message[\"t1\"] -> Double\n\n    # the audio data read from the device\n    message.data -> np.array\n        shape = [C, P] where C is channels, P is produce_frames\n        dtype = np.int32\n\n## Other\n\nAvailable BitDepths:\n\n    enum raa.BitDepth:\n        S16LE,\n        S24LE,\n        S32LE,\n        S24_3LE\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Roboflex Audio input library using ALSA",
    "version": "0.1.10",
    "project_urls": {
        "Homepage": "https://github.com/flexrobotics/roboflex_audio_alsa"
    },
    "split_keywords": [
        "alsa",
        "audio",
        "robotics",
        "middleware",
        "flexbuffers",
        "python",
        "c++",
        "c++20"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33129335384ae4439df49a92e981919e6bd35168b31c22519dfb194fe38ab8d7",
                "md5": "74f5bafdc9988e84484927dd8c72eedd",
                "sha256": "90f74f3e55d533c93f5a80199984e466f18cb54da744d1862e136a5af700c718"
            },
            "downloads": -1,
            "filename": "roboflex.audio_alsa-0.1.10.tar.gz",
            "has_sig": false,
            "md5_digest": "74f5bafdc9988e84484927dd8c72eedd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 10532,
            "upload_time": "2023-12-05T20:50:07",
            "upload_time_iso_8601": "2023-12-05T20:50:07.521913Z",
            "url": "https://files.pythonhosted.org/packages/33/12/9335384ae4439df49a92e981919e6bd35168b31c22519dfb194fe38ab8d7/roboflex.audio_alsa-0.1.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-05 20:50:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "flexrobotics",
    "github_project": "roboflex_audio_alsa",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "roboflex.audio-alsa"
}
        
Elapsed time: 0.14788s