Record the voice call packets in a file - android

I want to make an app to record voice call. I have read many relevant articles about it. I am aware that latest Galaxy comes with this feature. But wanted to know a few things:
When we use the native AudioRecord::start(), where is the recorded data stored in the File System?
What is the format of the recorded data?
how to access that data to manipulate it?
Thanks in advance.

I want to make an app to record voice call.
That is not possible in Android, as SDK applications do not have access to the in-call audio stream.
I am aware that latest Galaxy comes with this feature.
This was implemented by the device manufacturer in firmware. If you create your own custom firmware, this may be possible.
When we use the native AudioRecord::start(), where is the recorded data stored in the File System?
It does not store "recorded data" "in the File System". You get byte[] of data -- it is up to you to do something with it.
What is the format of the recorded data?
8-bit or 16-bit PCM, as you request via the constructor.

Related

Audio Matching (Audio Fingerprinting)

I'm writing an android app that lets user record his voice through microphone & save it in storage & link it to a specific content (like a Contact). Later, user call that voice again & the app should compare it with saved audio files & find the one that matches the voice.
I searched a lot & found some libraries that do this online, like EchoPrint that generates fingerprint from recorded audio & sends it to opensource server & returns the result. But I need to do this offline.
Has anybody know such library?
If you are aiming to compare an old recording of a user with a new call as it comes in, audio fingerprinting solutions like Dejavu in Python on a server or Echoprint in C++ won't help you. They are for doing recognition and retrieval on recorded audio segments plus noise.
They cannot deal with the variabilites in human voice. See an explanation here.
If that's the case, what you are referring to is speaker recognition, which is much harder and involves quite a bit of machine learning. It would be tough to do this for a large corpus of users (especially offline on a phone), but for determining between a couple users, it might be doable.
Below is a good Library. Which is Easy to use. But you need to convert your Audio Files to Wave Format prior to this.
https://code.google.com/p/musicg/

How do I read time samples of audio files in Android?

I want to write an app on Android to record snoring sounds of a sleeper and analyze it afterwards (i.e., not in real-time) for signs of a medical condition called obstructive sleep apnea.
The Android devices I've experimented with have voice recorders that produce a file format called .3ga. I want to programmatically read in the audio file and look at the amplitude for each individual time-sample. Then I can analyze that for patterns. Would this be easier if I converted this to a different format, e.g., MP3, and if so how can I do that programmatically?
I did a Google search on this and most of the hits seemed to be related to audio recording or playback which are unrelated to what I'm trying to do. I haven't coded anything yet because I don't know how to get started.
You are looking to do sample-based analysis on a raw audio signal, but the formats you mention are compressed. You will need to either deal with raw samples directly, or decompress the audio and then analyze.
Since you said you can do this work after-the-fact, why not upload to a server and analyze there?

Usage of RTP packets in Android Streaming application

Updating my previous question...
Currently I am working on a live media streaming application. I have been able to use the Media Recorder class to record medias and store it in a file. Currently I am trying to stream this media from android to Adobe Media streamer using RTP. What I have done us using the parcel file descriptor I have packaged the video contents which are captured from the device camera. Now I would want to use the RTPPackets class provided by Sipdroid to convert this packets into RTP packets.
I am having problems integrating this RTP Packets and using the same in to my application as I see there are multiple steps to be done
1) Creating RTP packets, even though I have got the code for RTP packetizer I am not exactly sure how to use the same and where to use this. Because I clearly not sure on what would be the default payload value, ssrc and ccrc values. May the first time these will carry the default values but the second time onward what would set the values for these parameters would it be the parcel file descriptor?
2) Creating a simple server kind of code on the mobile which continues to create the RTP packets and keep sending them to the Adobe media server?
Any help would be much appreciated.
Thanks,
K.Saravanan.

Is there a way to record calls in android?

Is there a way to write an app which records phone calls in android via android-sdk?
so that you can store phonecalls as .wav or something else?
I like to write something like a dictaphone.
Do you think, there is a chance to make this possible?
No. Android does not allow you to record the audio stream due to legal terms.
However due to buggy hardware implementations it is possible, on some devices, to record the audio stream.

Read an audio stream during (GSM) phone call

Is it possible to read an audio stream during (GSM) phone call? I would like to write an encoding application, and I do not want to go with SIP&VoIP. Thank you.
This will be phone and OS dependent and there are several apps that claim they record audio (Total Recall, Record my call on Android) but they generally seem to record via the microphone meaning the far end sound is poor.
I don't believe either the apple or android api's support access to the raw voice stream today.
Something to be aware of also is that it is not always legal to do this without informing the other party (i.e. the person on the other end of the call that you are planning to 'capture' the voice stream somehow) in many places - this may not be relevant for your particular plans but worth mentioning anyway.
If you have the option of doing the work in the network or on a PABX then you can create a basic (if not very efficient) solution by simply creating a three way (or conference) call.

Categories

Resources