Android: Play soundfile or text-to-speech during phone call/SIP - android

is it possible in android to make a phone call or SIP call and play a soundfile after the call is established? Other option that would be ok for me is that after the established call the TTS engine reads some text so that the person on the other side could hear that.
Is this possible?
Thanks!

If you mean played locally (i.e. only you can hear it), then sure. That should be working without using any special tricks.
If you mean inject audio into the uplink so that the other party can hear it, then no - at least not during a normal voice call. Perhaps it would be possible during a SIP call if you implement the whole SIP stack yourself and generate the audio packets in your app. I'm not really familiar with how SIP calls works, so I can't say whether that would work or not.

Related

Is it possible to combine OpenTok and regular calls on mobile?

I'm building video chat application. I'm wondering is it possible to make/receive calls during video conversation using OpenTok.
The main point is to allow hear each other caller and video companion - some kind of conference.
I've read documentation for OpenTok, Android and iOS developers and didn't find anything helpful
I've tried to test this and there is no sound in video conversation while call is active. Looks like they use same sound input and output
I know this is a bad question, but I don't know how to make proper request to google or documentation
There is no such connectivity right now, so, you cannot mix an OpenTok session, and a regular mobile phone call. You could be interested in inspecting connectivity with SIP networks:
https://tokbox.com/developer/guides/sip/

Chrome web audio api - how to play sound in a phone call

I cant find anything online but how can i use a chrome tab web audio api in an android app so i can play sound during a phone call.
i went to this site but when i play the sound during a phone call the far end doens't here anything. I thought one feature of web audio was that it can play change the sound of someones voice in a phone call, so i thought it had access to the audio phone call stream.
even here the tech says its ready for android but i cant even get hte audio recorder demo to work on android.
While you do (with the user permission) have access to the input of the device you only have access to the main output of the device (internal speakers or headphones). This is represented as the AudioContext.destination. The buffers in a call is (probably) a different output that you simply don't have access to in Web Audio (and that's probably a good thing. Imagine the security issues we'd have if apps were allowed to hijack calls!).

Phone-to-phone communication on Android

I am building an app that converts text messages to speech and sends them to the destination. At the other end, the speech is converted back to text messages.
I imagine it may be easy with Twilio but I don't want to use internet connection. A simple call should be enough to transmit the data.
Any idea on how I should proceed with this?
I don't think this is really possible to do, your tasks would be pretty heavy ...
TTS- that's no problem android has a library for that TTS and recording it
Make a phone call and monitor state Make phone call monitor state
Send your synthesized message - can't quite find a way to do this, seems problematic sending recorded messages over phone network it has been suggested that you could play the recording over the speaker and the microphone might pick that up, seems like a good way to introduce even more errors into the system though
On the other end something must answer - Answering a phone call
Record incoming call - this seems to be highly problematic on a non-rooted phone Recording incoming calls? or Recording incoming calls
Take the recording and do reliable STT without the benefit of a server back end, also highly problematic since the translation errors even on high end server apps are sometimes quite comical
So without a rooted phone with a custom rom I don't think all of this is possible even if you could overcome the poor quality of a double translation TTS -> STT
Twillo seems to be about making calls over the net vs. the phones digital network not about sending text (in essence) over a phone connection
Seems like a whole lot of extra work just to avoid an internet connection charge (of about 2 seconds and few bytes!)

Adobe AIR for mobile: Using Bluetooth audio as "Microphone"

I'm developing an AIR for Android application, and am current sending audio to fms servers via standard NetStream/Microphone options. I (ignorantly) assumed that attaching a bluetooth device would be pretty simple, and connecting it would make it show up as a native "Microphone". Unfortunately, it does not.
I don't think it is even possible to use Netstream.publish and publish raw bytes, so the only hope is that there's a way to use NativeProcess + Java to create a native microphone "handle" that AIR can pick up on.
Has anyone run into this issue?
I think one possible solution would be using NetConnection.send() instead of Netstream.publish().
You should get sound data from your BT microphone. I am not sure if you can get using AIR. You may need to use an android service that gets the sound data and feeds your AIR app via a file, a UDP port or an invoke etc.
When you get some sound data, encode it so flash can play it (Speex, Nellymoiser, etc) You can do the encoding in your Android service as well.
Whenever your AIR app receives a sound data, send it to your streaming server via NetConnection.Send().
Extend your streaming server to process sound data received. You can embed it into a flv stream, or send to other flash clients if it is a chat app.
Other than that, I can't find a way to have a "microphone handle" for your BT microphone. I once thought of creating a virtual device on Android, but I couldn't find any solution.

Is it possible to intercept voice data during call?

I plan to develop Android application which will encrypt/decrypt voice data such that parties can communicate using secure channel. So the question is: how to intercept voice/audio data during GSM call? Is it possible or not? Should I use Android NDK or something else?
In GSM it is not possible to encrypt the voice and send it through the voice channel due to channel characteristics. The signal sent through the voice channel has to be (similar to) human voice as vocoder (CELP) is used for channel coding.
So even if you had access to low level libraries and used it to encrypt voice to send it directly through the voice channel it would be not possible for the called party to receive and decrypt the signal.
Encrypted voice however could be sent through the data channel as data.
This is something that happens in the low level of the operating system. You wouldn't be able to access this information in the application level.
I suggest that you look into VOIP like SipDroid. I bet you'll be able to set it up to use encryption easily. (srtp instead of rtp)
Even if you SipDroid doesn't support this, it's is open source so you could add this feature.
Call recording is not yet possible on Android. See this feature request.
You can record your voice from microphone, but you can not record the sound of the other party. If you only want to record your voice use android.media.MediaRecorder.AudioSource.MIC
Simple Answer, NO!
if you are able to access low level libraries and used it to encrypt voice to send it directly through the voice channel off course it would not be possible for the called party to receive and decrypt the signal but if you modulate encrypted voice data and transform this voice data into speech like waveform and send through the voice channel of GSM then surely other party will receive and decrypt the voice.
I know there are apps that act like voice changer where they change your voice and transmit that thru gsm voice. Maybe you can make an app that takes the voice then modulate it to something like phase shift keying or digital radio monodiale like what hams used in vhf and hf radio communication and transmit the audio to gsm then demodulate it back to voice but instead of straight forward modulation demodulation you can add pgp, aes, or whatever encryption you like. I'm also intrested to see a project like this.
I think it would also be great if you could use this to transmit data thru voice gsm channel like the 56k modems in the past instead of the gprs channel.
See reference
http://freedv.org/tiki-index.php
http://www.aprs.org

Categories

Resources