Assume that there are two computers, two headsets with microphone.One PC (A) is having a user and one PC (B) does not have a user, but it is having a software which makes automated calls. Now B making a call to A and Playing something like "Please say 'DONE' if you already in your seat." Then A response for it by saying "DONE". Now here what I want to do is, When that person response it comes to the speaker as incoming audio.I want to make that same incoming voice as the input for microphone. because my voice recognition software only convert microphone inputs to words.
If someone understand my problem please reply/advice me. Upto now I used a windows function in my sound card (Listen to the device), but as the solution its not worthy since that voice is not clear and voice volume not enough for voice recognition.
Thank you.
Related
I try to write a Speech2speech translation app and the translation service is from Microsoft speech service api.
There are two function I want:
One of them is that earpiece receives my voice(English), and then, the speaker of mobile phone plays the translated result(Japanese).
The other one is that built-in microphone of mobile phone receives someone's voice(Japanese), and then, the earpiece plays the translated result(English).
I try some combinations of these settings, but I still find the correct combination to achieve my goal.
AudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION)
AudioManager.stopBluetoothSco()
AudioManager.setBluetoothScoOn();
AudioManager.setSpeakerphoneOn();
And all of "AudioManager.setMode"
For function 1:
mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
mAudioManager.stopBluetoothSco();
mAudioManager.setBluetoothScoOn(false);
mAudioManager.setSpeakerphoneOn(true);
For function 2:
mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
mAudioManager.setMicrophoneMute(false);
mAudioManager.startBluetoothSco();
mAudioManager.setBluetoothScoOn(true);
mAudioManager.setSpeakerphoneOn(false);
Above code is what I use right now.
But both of them receive the voice from built-in microphone of mobile phone and play the translated result on earpiece.
Is there any simple or clear way to select the input or output of audio?
I created a Java application and want to use barcode scanner in my Java application.
but don't have a device Barcode Scanner
How can I simulate a Barcode Scanner for testing my Java Application?
It really depends on how you want the scanner to connect to the system later on.
There are scanners that just use keyboard emulation. In that case you don't need to do anything (just make sure the right input box is active when expecting barcode input).
Other scanners connect to the system through a serial port emulation (for example, there's an USB to serial driver for Symbol/Motorola and Datalogic gun scanners). In that case, you open the serial port in Java and get scanner input as serial data. To simulate this, you'd have to connect your PC to another PC using a cross-over RS232 cable and could then use Hyperterminal/Putty/[whatever there is on linux or other OSs] to send data to your PC over the serial cable.
If you are running your application from the console,
Scanner scan = new Scanner(System.in);
String barcode = scan.nextLine();
Otherwise just pass your barcode to main method args.
I had a similar need and found the barcode-simulator project on GitHub. It covers a portion of the concerns raised in the comments, at least for the initial testing.
Still, there is nothing like the real deal. Expect that the mix of real users and real scanners are going to find unexpected holes in your application.
Provide really clear input to your clients:
When the users cursor is in the correct field have it change color and
show a message like "Waiting for Scan",
Clearly and quickly show if a scan is valid or invalid,
Make it trivial to rescan.
If your users are clear about what the path of success looks like then it should be good.
I am creating an app and would like to add a feature. What I want to do is be able to detect some sort of input code from another phone. For example, if phone A has my app and is talking to someone on phone B, if the person on phone B inputs a predetermined code, the app on phone A will do something.
Phone B ---> input code ---> app on phone A takes action
The app on phone A will be running in the background when it receives the input.
If this is not possible, then I have already found ways to do this with a text message using a BroadcastReceiver.
Here is a DTMF recognizer: http://code.google.com/p/dtmf-decoder/
No idea how ripe the project is. But it may be a source of inspiration for you :).
I am currently developing an Android anti-theft application and I am new in Android development. My apps is able to remotely lock the lost phone, so during configuration, user needs to enter a valid phone number, but how I determine whether the phone number entered is valid? Thanks
-Option one : read(get) the phone number from the sim card (if available, not all operators enable this)
-Option two : If sim card changed(sim serial number) lock the phone and send sms to an other phone number (since the thief will throw away the sim card )
-Option three : use what WHatApp android application uses to identify a person (sending an sms to a specified phone number and detect the incoming sms)
Option 3 seems a bit complicated since you will need a sever side with an sms gateway.
Well here's what comes to my mind .Good luck.
If you connect a data base so, compare to the phone number with to enter a phone number in field. I hope help you. :)
I did a project for a client where a same scenario was raised. Here is what we came to conclusion.
Send an SMS to the Number input and ask the number to send an sms code in reply.
eg. CONFIRM
If the number is valid and known to the user he will call them up
and ask them to SMS back.
If the number is valid and in use the message will get deliverd.
The client agreed the above scenario. Unless you have a really big Database of working numbers (updated so often), it will be a bypass solution.
I believe it is impossible to verify whether a phone number exists unless you call it. You could create a procedure where the app would call the entered phone number, and timed its connection. If the connections last longer than X amount of seconds, it is a valid phone number.
I want to write a program that will be able to call into my company's bi-weekly conference calls, and record the call, so it can then be made into a podcast.
I am thinking of using Gizmo's SIP interface (and the fact that it allows you to make toll-free calls for free), but I am having trouble finding any example code (preferably in Java) that will be able to make an audio call, and get hold of the audio stream.
I have seen plenty of SIP programming tutorials that deal with establishing a session, and then they seem to just do some hand waving, and say "here is where you can establish the audio connection" without actually doing it.
I am experienced in Java, so I would prefer to use it, but other language suggestions are welcome as well.
I have never written a VOIP application, so I'm not really sure where to start. Can anyone suggest a good library or other resource that would help me get started?
Thanks!
Look for a VOIP softphone writtin in Java, then modify it to save the final audio stream instead of sending it to be played.
Side note: In many states you would be violating the law unless you do one of several things, varying by state: Notify the participants they're being recorded, insert BEEPs every N seconds, both, etc. Probably you only have to comply with the laws of the state you're calling from. Even worse, you may need to allow the users to decline recording (requires you to be there before recording starts). If you control the conference server, you may be able to get it to play a canned announcement that the call is being recorded.
You could do this with Twilio with almost no programming whatsoever. It will cost you 3ยข per minute, so if your company's weekly call is 45 minutes long, you're looking at $1.35 per week, about as close to free as possible. Here are the steps:
Sign up for Twilio and make note of your Account ID and token
Create a publicly accessible file on your web server that does nothing but output the following XML (see the documentation for explanation of the record parameters):
<Response>
<Record timeout="30" finishOnKey="#" />
</ Response>
When it's time to start the recording, perform a POST to this URL (documented here) with your browser or set up an automated process or script to do it for you:
POST http://api.twilio.com/2008-08-01/Accounts/ACCOUNT SID HERE/Calls
HTTP/1.1
Called=CONFERENCE NUMBER HERE
&Url=WEB PAGE HERE
&Method=GET
&SendDigits=PIN CODE HERE
If you want to get really creative, you can actually write code to handle the result of the recording verb and email the link to the MP3 or WAV file that Twilio hosts for you. But, if this is a one off, you can skip it because you can access all your recordings in the control panel for your account anyway.
try peers with mediaDebug option true in peers.xml. This option records all outgoing and incoming media streams in a media/ folder with a date pattern for file name. Nevertheless this file will probably not be usable as is. It contains raw uncompressed lienar PCM samples. You can use Audacity, sox or ffmpeg to convert it to whatever you want.
https://voip.dev.java.net/
They have some sample code there.