{"id":21474641,"url":"https://github.com/pabsan-0/gst-awkward","last_synced_at":"2025-03-17T07:43:16.402Z","repository":{"id":221025544,"uuid":"631040682","full_name":"pabsan-0/gst-awkward","owner":"pabsan-0","description":"Gstreamer audio application that plays music when mic is silent","archived":false,"fork":false,"pushed_at":"2023-04-23T15:48:30.000Z","size":357,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T16:53:03.325Z","etag":null,"topics":["alsa","audio-processing","gnuplot","gstreamer","repos-gstreamer"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pabsan-0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-21T19:14:15.000Z","updated_at":"2024-08-30T08:49:53.000Z","dependencies_parsed_at":"2024-02-05T20:00:13.901Z","dependency_job_id":"6d950b21-772c-424c-847d-1faee5a273a6","html_url":"https://github.com/pabsan-0/gst-awkward","commit_stats":null,"previous_names":["pabsan-0/gst-awkward"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fgst-awkward","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fgst-awkward/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fgst-awkward/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pabsan-0%2Fgst-awkward/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pabsan-0","download_url":"https://codeload.github.com/pabsan-0/gst-awkward/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243996898,"owners_count":20380978,"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","audio-processing","gnuplot","gstreamer","repos-gstreamer"],"created_at":"2024-11-23T10:24:24.279Z","updated_at":"2025-03-17T07:43:16.381Z","avatar_url":"https://github.com/pabsan-0.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gst-awkward  \n\nA small gstreamer application that plays music, but shuts up whenever someone speaks. Quit awkward silences today!\n\n## Usage\n\n- Match dependencies:\n    - Gstreamer\n    - Alsa-utils [optional]: `apt install alsa-utils`\n    - Gnuplot [optional]: `apt install gnuplot`\n- Clone this repo `git clone https://github.com/pabsan-0/gst-awkward`\n- Set your device configuration in the `src/main.c` `#define`s \n- Build the tool: `make`\n- Run the app with `./main.o`\n\n## The audio essentials\n\n- Audio loopback `sudo modprobe snd-aloop`\n- List mic-like devices `arecord -l`\n- List speaker-like devices `aplay -l`\n- Hardware spec: `hw:x,y,z` `hw:card,device,subdevice`\n  - `x`: Card\n  - `y`: Device\n  - `z`: Subdevice\n- Gstreamer elements:\n    - `alsasink`, `alsasrc`: Advanced Linux Sound Architecture\n    - `audioconvert`\n    - `volume`, `level`: for setting/reading levels\n    - `decodebin`, `autovideosink`, `autovideosrc`\n\n## Snippets:\n```\n# Playing audio file in a loop\ngst-launch-1.0 multifilesrc loop=1 location=media/short.mp3 ! decodebin ! audioconvert ! alsasink\n\n# Introducing delay\ngst-launch-1.0 audiotestsrc ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 min-threshold-time=1000000000000 ! autoaudiosink\n\n# Mic to speaker with native delay (fractions of a sec)\ngst-launch-1.0 alsasrc device=\"hw:3,0,0\" ! alsasink \n\n# Mic to speaker fancier\ngst-launch-1.0 alsasrc device=\"hw:3,0,0\" ! volume volume=1.5 ! level message=TRUE ! alsasink \n```\n\n\n## Links \n\n- Linux audio 101 small tutorial [TheSalarKhan/Linux-Audio-Loopback-Device](https://github.com/TheSalarKhan/Linux-Audio-Loopback-Device)\n- On introducing delay on a pipeline https://stackoverflow.com/a/17218113\n- Level plugin example https://github.com/krad-radio/gstreamer-plugins-good-krad/blob/master/tests/examples/level/level-example.c\n\n\n## Acknowledgements\n\n- Song bit from The Engagement by Silent Partner: https://www.youtube.com/watch?v=_TcAQEufZcU\n\n\n\n\u003c!-- \n\ncmake, Makefile\n.editorconf\nsettings.ini glib\n\nRuntime dependencies of programs:\n\n$ ldd ./main.o\n        libgstreamer-1.0.so.0 =\u003e /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007f375de2b000)\n        ...\n$ apt-file search libgstreamer-1.0.so.0\nlibgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0\nlibgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.2001.0\nlibgstreamer1.0-0: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.2003.0\nlibgstreamer1.0-dev: /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.2001.0-gdb.py\nlibgstreamer1.0-dev: /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.2003.0-gdb.py\n\n```\n# GST_DELAY 10^6\nGST_DELAY (){\n    echo \"queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 min-threshold-time=`echo $1 | bc`\"\n}\n\n```\n--\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabsan-0%2Fgst-awkward","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpabsan-0%2Fgst-awkward","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpabsan-0%2Fgst-awkward/lists"}