Speechrecognition while filming with camera - java

I'm developing an android app that needs to film and use speechrecognition at the same time. The problem is, that the camera uses the microphone so the speechrecognition api wont have acces to the microphone.
My solution was to disable the audio in the camera and only record the video. Problem with this solution is that when using the RecognitionListener you can't acces the audio file.
Then i tried to use the RecognizerIntent with startActivityForResult. The problem with this solution is that the activity will open a 'pop up' and the camera stops working. Does anyone have an idea how to fix this problem.

When you record video. did you receive any callback for what is recording? I mean if you can receive audio, you can save that audio alone, and then access it by recognizer

Related

How to Record Current Screen In Android, Not using Camera

I want to implement a function that simply records what is currently being viewed on my phone, rather than using the camera.
But most of the samples use MediaRecorder and camera in parallel, I don't think this is what I need at the moment.
I've seen the MediaProjection API, but it runs in an Activity . I want to implement a screen recording function for a live streaming app I am currently developing. And this should work inside a Service.
Can someone give me some help?

Use mediaprojection as a videosource for libstreaming

I'm new in android developing and i want to develop an app about (android) screen sharing to multiple android device in a local network. I want to send the output of mediaprojection in real time using libstreaming library. Is it possible? How can i replace the video source of libstreaming with the mediaprojection output?
Inside the VideoStream.java file wherein the source of the media recording is set to Camera, go ahead and change it to Surface.
MediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE)
This is assuming you want the screen recording to be streamed live to another screen.

How to add a music player to my app?

So I made a website someday, and now via webview and the YouTube Api I made it possible to listen to the music on my phone.
But... as soon as I close my app it stops playing the music.
How can I possibly add a music player and make it so the music keeps playing after the phone goes on standby mode?
Thank you very much!
Even thought I haven't deal with Youtube API for Android, I think that what you are trying to do is impossible. Even the Youtube App doesn't keep music playing after the phone goes on standby mode. That's their policy about music videos on Youtube.

android-developing music player

I'm developing an Android music player and so my app should be able to detect volume key presses even when no Activity of my app is open and the screen is off(a background service is playing the media). I was thinking that it seems crystal clear that i should detect volume key presses from my service but as I searched the net, I got that it is impossible(e.g. as described here). so what should I do?!!!
You'll need to create a service, because activities don't run when screen is off
You need to run player in service. Also, you must set media type as music.

Recording sound, and then using/saving it on Android

I want to add a feature into my app where you can record sound and then use it within the app (MediaPlayer)
How can I do this?
How do I record sound?
How do I get it into a Mediaplayer?
Does it have to be saved? or can it go from being recorded -> into app straight away...
Use AudioRecord class.

Categories