{"id":21274036,"url":"https://github.com/flexrobotics/roboflex_audio_alsa","last_synced_at":"2025-07-11T06:33:40.342Z","repository":{"id":201796992,"uuid":"707411960","full_name":"flexrobotics/roboflex_audio_alsa","owner":"flexrobotics","description":"Roboflex support for reading audio from linux's ALSA.","archived":false,"fork":false,"pushed_at":"2023-12-05T20:52:01.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-11T11:33:11.665Z","etag":null,"topics":["alsa","roboflex"],"latest_commit_sha":null,"homepage":"https://github.com/flexrobotics/roboflex_audio_alsa","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flexrobotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-19T21:00:28.000Z","updated_at":"2023-11-01T00:46:30.000Z","dependencies_parsed_at":"2023-10-23T04:21:41.757Z","dependency_job_id":null,"html_url":"https://github.com/flexrobotics/roboflex_audio_alsa","commit_stats":null,"previous_names":["flexrobotics/roboflex_audio_alsa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_audio_alsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_audio_alsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_audio_alsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flexrobotics%2Froboflex_audio_alsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flexrobotics","download_url":"https://codeload.github.com/flexrobotics/roboflex_audio_alsa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225701180,"owners_count":17510502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alsa","roboflex"],"created_at":"2024-11-21T09:18:40.859Z","updated_at":"2024-11-21T09:18:42.175Z","avatar_url":"https://github.com/flexrobotics.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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 -\u003e Float\n\n    # the timestamp just after reading from device\n    message.t1 -\u003e Float\n\n    # the audio data read from the device\n    message.data -\u003e 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\"] -\u003e Double\n\n    # the timestamp just after reading from device\n    message[\"t1\"] -\u003e Double\n\n    # the audio data read from the device\n    message.data -\u003e 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexrobotics%2Froboflex_audio_alsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflexrobotics%2Froboflex_audio_alsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflexrobotics%2Froboflex_audio_alsa/lists"}