{"id":19373312,"url":"https://github.com/adrielcafe/androidaudiorecorder","last_synced_at":"2025-04-08T11:12:58.066Z","repository":{"id":39380763,"uuid":"65038509","full_name":"adrielcafe/AndroidAudioRecorder","owner":"adrielcafe","description":"A fancy audio recorder lib for Android. Supports WAV format at 48kHz.","archived":false,"fork":false,"pushed_at":"2021-09-10T03:05:46.000Z","size":445,"stargazers_count":1629,"open_issues_count":57,"forks_count":386,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-04-01T10:07:32.067Z","etag":null,"topics":["android","library","record-audio","wav"],"latest_commit_sha":null,"homepage":"","language":"Java","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/adrielcafe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"adrielcafe"}},"created_at":"2016-08-05T17:56:15.000Z","updated_at":"2025-03-30T00:43:00.000Z","dependencies_parsed_at":"2022-07-16T10:01:19.655Z","dependency_job_id":null,"html_url":"https://github.com/adrielcafe/AndroidAudioRecorder","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrielcafe%2FAndroidAudioRecorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrielcafe%2FAndroidAudioRecorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrielcafe%2FAndroidAudioRecorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrielcafe%2FAndroidAudioRecorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrielcafe","download_url":"https://codeload.github.com/adrielcafe/AndroidAudioRecorder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247829511,"owners_count":21002997,"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":["android","library","record-audio","wav"],"created_at":"2024-11-10T08:27:47.979Z","updated_at":"2025-04-08T11:12:58.034Z","avatar_url":"https://github.com/adrielcafe.png","language":"Java","funding_links":["https://ko-fi.com/adrielcafe"],"categories":[],"sub_categories":[],"readme":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AndroidAudioRecorder-green.svg?style=true)](https://android-arsenal.com/details/1/4099) [![Release](https://jitpack.io/v/adrielcafe/AndroidAudioRecorder.svg)](https://jitpack.io/#adrielcafe/AndroidAudioRecorder)\n\n# AndroidAudioRecorder\n\n\u003e A fancy audio recorder for Android. It supports `WAV` format at `48kHz`.\n\n![Screenshots](https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/master/demo.gif)\n\n![Screenshots](https://raw.githubusercontent.com/adrielcafe/AndroidAudioRecorder/master/screenshots.png)\n\n## How To Use\n\n1 - Add these permissions into your `AndroidManifest.xml` and [request for them in Android 6.0+](https://developer.android.com/training/permissions/requesting.html)\n```xml\n\u003cuses-permission android:name=\"android.permission.RECORD_AUDIO\"/\u003e\n\u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/\u003e\n\u003cuses-permission android:name=\"android.permission.WAKE_LOCK\" /\u003e\n```\n\n2 - Open the recorder activity\n```java\nString filePath = Environment.getExternalStorageDirectory() + \"/recorded_audio.wav\";\nint color = getResources().getColor(R.color.colorPrimaryDark);\nint requestCode = 0;\nAndroidAudioRecorder.with(this)\n    // Required\n    .setFilePath(filePath)\n    .setColor(color)\n    .setRequestCode(requestCode)\n    \n    // Optional\n    .setSource(AudioSource.MIC)\n    .setChannel(AudioChannel.STEREO)\n    .setSampleRate(AudioSampleRate.HZ_48000)\n    .setAutoStart(true)\n    .setKeepDisplayOn(true)\n    \n    // Start recording\n    .record();\n```\n\n3 - Wait for result\n```java\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    super.onActivityResult(requestCode, resultCode, data);\n    if (requestCode == 0) {\n        if (resultCode == RESULT_OK) {\n            // Great! User has recorded and saved the audio file\n        } else if (resultCode == RESULT_CANCELED) {\n            // Oops! User has canceled the recording\n        }\n    }\n}\n```\n\n## Import to your project\nPut this into your `app/build.gradle`:\n```\nrepositories {\n  maven {\n    url \"https://jitpack.io\"\n  }\n}\n\ndependencies {\n  compile 'com.github.adrielcafe:AndroidAudioRecorder:0.3.0'\n}\n```\n\n## FEATURES\n- [X] Record audio\n- [X] Tint images to black when background color is too bright (thanks to [@prakh25](https://github.com/prakh25))\n- [X] Wave visualization based on this [player concept](https://dribbble.com/shots/2369760-Player-Concept)\n- [X] Play recorded audio\n- [X] Pause recording\n- [X] Configure audio source (Mic/Camcorder), channel (Stereo/Mono) and sample rate (8kHz to 48kHz)\n- [X] Auto start recording when open activity\n- [X] Keep display on while recording\n- [ ] Skip silence\n- [ ] Animations\n- [ ] Landscape screen orientation (only supports portrait at the moment)\n\n## Dependencies\n* [OmRecorder](https://github.com/kailash09dabhi/OmRecorder)\n* [WaveInApp](https://github.com/Cleveroad/WaveInApp)\n\n## Want to CONVERT AUDIO into your app?\n**Take a look at [AndroidAudioConverter](https://github.com/adrielcafe/AndroidAudioConverter)! Example of usage [here](https://github.com/adrielcafe/AndroidAudioRecorder/issues/8#issuecomment-247311572).**\n\n## License\n```\nThe MIT License (MIT)\n\nCopyright (c) 2016 Adriel Café\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrielcafe%2Fandroidaudiorecorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrielcafe%2Fandroidaudiorecorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrielcafe%2Fandroidaudiorecorder/lists"}