Android: redirect audio to file? - android

My Android application relies on a closed-source Text-To-Speech API.
When I invoke .speak(String s) method it coverts supplied text to sound and plays it back.
However, I also want to be able to save that sound to an .mp3 file for later playback.
So, is it somehow possible to redirect an AudioStream to a file?

Related

How do I save the audio file after using setPitch()?

I am using a Flutter plugin called just_sound and the publisher's page says to ask questions about it here on SO.
I've managed to use the setPitch() method to change the pitch of the audio file being played back. I now want to send this modified audio file to Firebase Storage, but it looks like using setPitch doesn't permanently change the pitch of the audio file. It only temporarily changes it during playback. How do I permanently change the pitch so that I can save it to the device and then ultimately send it to Firebase Storage?

Amdroid app: Video player app

I am making a video player app. Lets make myself clear in this app no video or audio files will be saved in the raw directory during making the app. I want an app that will pick a video file from device storage when clicked a button. So please help.
You have a few options for allowing the user to pick a video, including:
Use ACTION_OPEN_DOCUMENT on Android 4.4+. You will get a Uri back that you can pass to VideoView or MediaPlayer.
Use ACTION_GET_CONTENT. Again, you will get a Uri back that you can pass to VideoView or MediaPlayer.
Use a third-party file picker library. Depending on the library, I would expect you to get a File or a Uri back for use with your video player.
The first two techniques are covered in the documentation, along with good books on Android app development.

How to get currently plaing audio file info in background (The audio may be playing by any app) in android

I'm going to make one app, in this the partial requirement is like this: get the currently playing audio name using service. I tried but I'm unable to find the exact way, here is my finding. How to get all the audio file using mediastore
There is no way to know what file another app may be playing.

How can i allow users to save videos which are streamed in webview

I have an app which is using android webview .i am able to stream video in webview .i want know how can i allow users to to save videos automatically in thier internal storage which they stream in webview on website ? Thanks in advance
Most videos streaming to a browser (PC or mobile) will not allow download as the owner of the video may not want to allow it be saved and copied etc.
Simple http progressive download may allow you to save the video in a regular browser by simply right clicking on it.
DRM protected video will generally use a video pipeline (a sort of 'path' through your device) that does not allow an application of any kind access the raw video - this is again is to avoid people making unauthorised copies.
If you think the video in your case is allowed to be copied then you may find it easier to write some functionality to act as the streaming client and save the file locally. You could also pass the received stream along to the media player or to a webview if you wanted to play the file in parallel to saving it.

Android: Where is Speech Recognition temp audio file saved?

When I press and hold the search key on my Droid it starts the built in Android voice recognition.
While it is listening, if I speak the words "Note to self" and then keep talking, when done I get an email ready to send complete with the STT translation and the amr encoded audio file as an attachment.
I want to include this same functionality in my own program. More specifically, I need access to the audio file that is (or appears to be) created by speechrecognizer.
How do I access this audio file?
I am using api level 7. If I try to record and use speechrecognizer at same time it fails.
Any help appreciated.
I don't think the com.google.android.voicesearch application provides access to the recorded audio files. The files are temporarily stored in /data/data/com.google.android.voicesearch/files after the user makes a recording, but I'm not sure how you would get read access to those files.

Categories

Resources