grabar llamada de voz en android

I should record voice during call, I do it with a GIO SUMSUNG cellphone but it records voice call and microphone voice both, I mean that I have recorded both voice not only the other-party.

And in the sound I have recorded, microphone's voice is too louder than the other one.

¿Qué puedo hacer?

Can I record only the other party voice? Or It becomes louder sound. I did it before but today I really stuck on it.

preguntado el 22 de mayo de 12 a las 11:05

3 Respuestas

contestado el 22 de mayo de 12 a las 11:05

En lugar de myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);

utilizado myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);

This particular option is described here> http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html Voice call uplink + downlink audio source That means the recording will contain both voices.

Be careful when you start recording. When the call is initiated or when the other-party answer the call.

contestado el 16 de mayo de 15 a las 16:05

Prueba esto:

private MediaRecorder myAudioRecorder;

       private String outputFile = null;
       public void record()
       {

              myAudioRecorder = new MediaRecorder();
              myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
              myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
              myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.DEFAULT);
              myAudioRecorder.setOutputFile(outputFile);

              try {
                  myAudioRecorder.prepare();
                  myAudioRecorder.start();

               } catch (IllegalStateException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
               } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
               }

               Toast.makeText(getApplicationContext(), "start", Toast.LENGTH_SHORT).show();

       }

       public void stop()
       { myAudioRecorder.stop();
         myAudioRecorder.reset();
          myAudioRecorder.release();
          myAudioRecorder  = null;

          Toast.makeText(getApplicationContext(), "successfull",
          Toast.LENGTH_LONG).show();
          }

Respondido 19 Abr '15, 22:04

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.