android-mediarecorder

How to detect when there is some speech near MIC in Android

ぐ巨炮叔叔 提交于 2020-01-02 08:21:02
问题 Question Statement: I want to start recording when there is some Voice/Noise in vicinity of Phones MIC and stop when user stops speaking. Just Like Talking Tom etc. Is there any third party library or some native code to do this? Thanks 回答1: Just add this code to your application and you will detect when user start to speak and when he stops. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Get the minimum buffer size

How can i pause voice recording in Android?

风流意气都作罢 提交于 2020-01-01 03:01:51
问题 My aim is to pause in recording file. I see in Android developer site its but Media Recorder have not pause option. Java supports merge two audio file programatically but In android its not work. Join two WAV files from Java? And also I used default device audio recorder Apps which is available in all device but in Samsung few devices have not returened recording path. Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION); startActivityForResult(intent,REQUESTCODE_RECORDING);

Android record video without audio

自闭症网瘾萝莉.ら 提交于 2019-12-28 06:31:17
问题 Is it possible in Android to record video from Camera without audio stream? Goal: to reduce the output file size. 回答1: You can use a MediaRecorder without calling setAudio* on it. This is my first time using MediaRecorder, but this example seems to work: public class CamcorderView extends SurfaceView implements SurfaceHolder.Callback { private SurfaceHolder mHolder; private Camera mCamera; private MediaRecorder mRecorder; public CamcorderView(Context context, AttributeSet attrs) { super

MediaRecorder start failed: -38

微笑、不失礼 提交于 2019-12-27 12:24:00
问题 i searched to check if this question is no dup , i see some has no answer and others did not help. this is my code : private void startRecording() { mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); mFileName = Environment.getExternalStorageDirectory().getAbsolutePath(); mFileName += "/recordedHeckPost_.3gp"; mRecorder

button.performclick() is not working

廉价感情. 提交于 2019-12-25 19:08:34
问题 I have a simple code which records video on clicking a button. Manual click works fine but myButton.performClick() does not work (the app stops). I have tried setPressed() too but the click by it does not cause any effect. If I directly start mediarecorder without any button click, then also the app crashes. I am clueless. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); recording = false; setContentView(R.layout.main); //Get Camera for preview myCamera =

Automatic Gain Control(AGC) for external mic

余生长醉 提交于 2019-12-25 07:09:04
问题 I have an audio recording app on android market which records using PCM-WAV format. My app also offers custom gain control ([-20dB, +20dB]) , so I alter the original audio data with user selected gain value. It works pretty well when using device built-in mic, but I have a user which uses some external mic plugged into his device, and the output is too loud and full of distortions (because of the loudness of his ext mic). Even when he set the gain to -20dB, the output is loud and contains

MP4 filewriter in android 4.1+

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 16:13:54
问题 Starting from Android 4.1 (API level 16) MediaCodec APIs have been introduced. These APIs support Elementary stream Decoding & Encoding. Also MediaExtractor API will give elementary track details by analyzing Media streams. My Question is, I setup a video encoder using MediaCodec API, which gives me encoded file in .h264 format. I want to write .h264 file into a .mp4 file for playing/storing/sharing purposes. I don't find any .MP4 file-writer API for android. Is there any way to achieve it?

MediaRecorder freezes the UI thread

最后都变了- 提交于 2019-12-24 11:20:07
问题 I'm using CameraKit library to record video in my app. The issue that I'm facing is that when i start recording then i need to show recording progress as well. But as i call video recording method in which MediaRecorder is prepared and started that freezes the UI thread for ~500-700ms which doesn't let progressBar animate and it feels like on long press of recording button is taking long time but infact it is MediaRecorder that is taking time. Can MediaRecorder be started in background thread

How to execute both Speech Recognition and Audio recording at the same time?

扶醉桌前 提交于 2019-12-24 00:58:40
问题 THIS IS NOT A DUPLICATE, HERE I TALK ABOUT STOPPING AND STARTING THE RECORD PROCESS WHENEVER I WANT. BEFORE MARKING AS DUPLICATES, PLEASE READ THE OTHER ANSWER PROPERLY. I am developing a Phonegap plugin for Android . This plugin will basically support the Android Speech Recognition and recording the speech. I am capable of starting, stopping etc the speech recognition, but got serious issues with recording. First, the code is posted below. Below is how I start the speech, end it etc. public

mediarecorder.setVideoSize() fails with maximum resolution

别说谁变了你拦得住时间么 提交于 2019-12-23 23:14:09
问题 I tried to find the camera resolution by final Parameters p = this.camera.getParameters(); List<Size> previewSizes=p.getSupportedPreviewSizes(); and set the video size of media recorder by this.mediaRecorder.setVideoSize(previewSizes.get(0).width, previewSizes.get(0).height); I used to record video in Landscape mode. MediaRecorder fails to record video with this high resolution. When I try with less resolution, it is recording. Is there a problem with screen display size and video size we are