{"id":19233826,"url":"https://github.com/onnesok/raspberrypi_mic_speaker_fix","last_synced_at":"2026-05-10T16:03:09.907Z","repository":{"id":159615605,"uuid":"634742435","full_name":"Onnesok/raspberrypi_mic_speaker_fix","owner":"Onnesok","description":"Raspberry pi mic fix instructions.","archived":false,"fork":false,"pushed_at":"2023-05-01T04:42:02.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T11:43:25.029Z","etag":null,"topics":["microphone-array","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Onnesok.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,"publiccode":null,"codemeta":null}},"created_at":"2023-05-01T04:12:35.000Z","updated_at":"2024-09-25T06:42:09.000Z","dependencies_parsed_at":"2023-05-09T15:01:04.889Z","dependency_job_id":null,"html_url":"https://github.com/Onnesok/raspberrypi_mic_speaker_fix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Onnesok/raspberrypi_mic_speaker_fix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onnesok%2Fraspberrypi_mic_speaker_fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onnesok%2Fraspberrypi_mic_speaker_fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onnesok%2Fraspberrypi_mic_speaker_fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onnesok%2Fraspberrypi_mic_speaker_fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Onnesok","download_url":"https://codeload.github.com/Onnesok/raspberrypi_mic_speaker_fix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Onnesok%2Fraspberrypi_mic_speaker_fix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273556100,"owners_count":25126494,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["microphone-array","raspberry-pi"],"created_at":"2024-11-09T16:11:59.893Z","updated_at":"2026-05-10T16:03:09.848Z","avatar_url":"https://github.com/Onnesok.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry pi microphone and sound problem fixed\n\u003c/body\u003e\n\u003c/html\u003e\n\n\n[![Facebook URL](https://img.shields.io/static/v1?color=red\u0026label=Facebook\u0026logo=Facebook\u0026logoColor=white\u0026style=for-the-badge\u0026message=Connect)](https://facebook.com/Onnesok.94)\n[![Youtube URL](https://img.shields.io/static/v1?color=red\u0026label=Youtube\u0026logo=Youtube\u0026logoColor=white\u0026style=for-the-badge\u0026message=subscribe)](https://www.youtube.com/Onnesok)\n[![Instagram URL](https://img.shields.io/static/v1?color=red\u0026label=Instagram\u0026logo=Instagram\u0026logoColor=white\u0026style=for-the-badge\u0026message=follow)](https://www.instagram.com/Onnesok/)\n[![Pinterest URL](https://img.shields.io/static/v1?color=red\u0026label=Pinterest\u0026logo=pinterest\u0026logoColor=white\u0026style=for-the-badge\u0026message=Follow)](https://www.pinterest.com/ratulhasan94/)\n\n**In freshly installed raspbian os sometimes we need to specify cards to work with microphone. Sometimes it may require to create .asoundrc file to specify speaker and microphone card seperately**\n\n\u003cp\u003eupdate and upgrade your pi\u003c/p\u003e\n\n```\nsudo apt update -y\nsudo apt upgrade -y\n```\n\n## Now find device ids. \n\u003cp\u003e For speakers type \u003c/p\u003e\n\n```\naplay -l \n\n```\n\u003cp\u003e Output \u003c/p\u003e\n\n```\n**** List of PLAYBACK Hardware Devices ****\ncard 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]\n  Subdevices: 7/7\n  Subdevice #0: subdevice #0\n  Subdevice #1: subdevice #1\n  Subdevice #2: subdevice #2\n  Subdevice #3: subdevice #3\n  Subdevice #4: subdevice #4\n  Subdevice #5: subdevice #5\n  Subdevice #6: subdevice #6\ncard 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]\n  Subdevices: 1/1\n  Subdevice #0: subdevice #0\ncard 1: Microphone [USB Microphone], device 0: USB Audio [USB Audio]\n  Subdevices: 1/1\n  Subdevice #0: subdevice #0\n  \n  ```\n  \u003cp\u003e \n  Based on the above output we have three devices:\n\nThe onboard 3.5mm plug listed as BCM2835 ALSA: Card 0, Device 0 (“hw:0,0”)\nThe onboard HDMI connection listed as bcm2835 IEC958/HDMI: Card 0, Device 1 (“hw:0,1”)\nThe USB microphone listed as USB Audio: : Card 1, Device 0 (“hw:1,0”)\nIn this example we want to use the 3.5mm audio jack, so we’ll use Card 0, Device 0 as the way to locate our speaker device. The USB microphone doesn’t have audio output and is not valid as a speaker setting. It is listed however, which can cause confusion.\n  \u003c/p\u003e\n  \n  # Now for microphone\n  \n  ```\n  arecord -l\n  \n  ```\n  \n  \u003cp\u003e Output \u003c/p\u003e\n  \n  ```\n  \n  **** List of CAPTURE Hardware Devices ****\ncard 1: Microphone [USB Microphone], device 0: USB Audio [USB Audio]\n  Subdevices: 1/1\n  Subdevice #0: subdevice #0\n  \n  ```\n  \n  \u003cp\u003e Based on the output usb microphone is there as Card 1 and Device 0 (“hw:1,0”) \u003c/p\u003e\n  \n  \u003cp\u003eNow let's change or create file to fix that\u003c/p\u003e\n  \n  ```\n  sudo nano home/pi/.asoundrc\n  \n  ```\n  \n  \n \u003cp\u003enow use the given code in repository and you're done\u003c/p\u003e\n \n \n ## Test if it works\n \n Record\n \n ```\n \n arecord -f S16_LE -r 48000 onnesok.wav\n \n ```\n play\n \n ```\n aplay onnesok.wav\n \n ```\n\nok fixed \n\n\u003chr/\u003e\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonnesok%2Fraspberrypi_mic_speaker_fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonnesok%2Fraspberrypi_mic_speaker_fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonnesok%2Fraspberrypi_mic_speaker_fix/lists"}