2

I am new to Android and Java and I need to know if this would be possible
I want to capture the sound input to the phone's microphone, perform some computations on this signal and output the modified signal to the earphones
Is processing the input to the microphone in real time like this possible?
THE ANDROID DEVELOPERS WEBSITE says that

Note: The Android Emulator does not have the ability to capture audio, but actual devices are likely to provide these capabilities.

What does it mean by likely? Is it possible that some phones do not even allow reading from the microphone at all?

user13267
  • 6,871
  • 28
  • 80
  • 138
  • Well, why would they be able to guarantee it? :) However, I think it's safe to assume that most devices have a microphone at least. – keyser Aug 08 '13 at 09:50
  • they would have have a microphone, but does the system allow a programmer to read data from it in real time, process it and then output the result to the speaker? – user13267 Aug 08 '13 at 09:54
  • or does by `these capabilities`, the sentence is actually implying the presence of a microphone in the first place? – user13267 Aug 08 '13 at 09:55
  • Well most devices have a recorder app, or at least the ability to run one. So I'd say it's possible – keyser Aug 08 '13 at 09:57
  • a recorder would save the voice data to disk as it is, without allowing us to do anything else on it, but I need to be able to perform some processing on this data, then output the result to the speaker in real time – user13267 Aug 08 '13 at 09:59
  • All I'm saying is that it's possible since those apps exist. How you'd go about implementing such a thing is a completely different issue :p – keyser Aug 08 '13 at 10:00
  • Has this implemented? I need to know how can i separate audio buffer channel wise – Feroz Siddiqui Dec 16 '19 at 21:50
  • To get better intuition about *Audio Processing*, you can visit this reference: [Android-Audio-Processing-Using-WebRTC](https://github.com/mail2chromium/Android-Audio-Processing-Using-WebRTC) – Muhammad Usman Bashir May 22 '20 at 05:35

1 Answers1

6

It is possible.

When you record the audio you can buffer it do some processing and then output it or save it or whatever....

There is an app for example that does the following thing when someone calls you:

It combines your voice with some sound you recorded and plays it in sync to the caller, making him think your are on a party, a bus etc....this is an example of processing the sound recorded.

Edit 1: Here is a similar topic that should guide you further how to implement this. Real-time audio processing in Android

Community
  • 1
  • 1
JanBo
  • 2,925
  • 3
  • 23
  • 32
  • any examples or links? – user13267 Aug 08 '13 at 10:44
  • https://play.google.com/store/apps/details?id=com.weirdvoice&hl=en or https://play.google.com/store/apps/details?id=com.gridmob.android.funnycall&hl=en ...just google voice change app android, etc... – JanBo Aug 08 '13 at 10:45
  • here is another one https://play.google.com/store/apps/details?id=com.IG.CallTricks&hl=en ...so yes it is possible :) – JanBo Aug 08 '13 at 10:49
  • so it's like Skype, but performing voice processing in real time? Are there any examples of apps that perform real time voice processing (like those that make you sound like a robot for example) that don't require any network connection? – user13267 Aug 08 '13 at 10:49
  • All these apps do real time processing, they require network connection so they can send the processed sound to the other user in the call. Since you just want to play it on your speaker you dont need network connection...Are there any of them on Google Store i dont know i havent looked for them :) try searching it, if there arent any you can be the first to make it ;) – JanBo Aug 08 '13 at 10:52
  • Can you help me with https://stackoverflow.com/questions/61184352/android-accessibility-service-real-time-audio-processing question – Feroz Siddiqui Apr 13 '20 at 08:53