Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As your log says that "Could not get audio input for record source 1" that means. Android Device not found any hardware for recording the Sound.</p> <p>So If you are testing the app from Emulator then make sure that you have successfully attached the mice during recording of the sound or if you are debugging or running it from the device then be sure that the Mic is on to record the Sound.</p> <p>Hope it will help you.</p> <p>Or </p> <p>If above not solve your issue then use the below code to record the Sound as it works perfect for me.</p> <p>Code:</p> <pre><code> record.setOnClickListener(new View.OnClickListener() { boolean mStartRecording = true; public void onClick(View v) { if (mStartRecording==true) { //startRecording(); haveStartRecord=true; String recordWord = wordValue.getText().toString(); String file = Environment.getExternalStorageDirectory().getAbsolutePath(); file = file+"/"+recordWord+".3gp"; System.out.println("Recording Start"); //record.setText("Stop recording"); record.setBackgroundDrawable(getResources().getDrawable( R.drawable.rec_on)); mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mRecorder.setOutputFile(file); mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); </code></pre> <p>// mRecorder.setAudioChannels(1); // mRecorder.setAudioSamplingRate(8000);</p> <pre><code> try { mRecorder.prepare(); } catch (IOException e) { Log.e(LOG_TAG, "prepare() failed"); } mRecorder.start(); } else { //stopRecording(); System.out.println("Recording Stop"); record.setBackgroundDrawable(getResources().getDrawable( R.drawable.rec_off)); mRecorder.stop(); mRecorder.release(); mRecorder = null; haveFinishRecord=true; } mStartRecording = !mStartRecording; } }); </code></pre> <p>Hope this answer help you.</p> <p>Enjoy. :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload