Android: Where is Speech Recognition temp audio file saved? - android

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.

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?

Audio file to speech-to-text android engine

I would the android speech-to-text system analyze an audio file instead a normal microphone flow, is it possible?
It is ofcourse possible. Take a look at Google Cloud Speech, it accepts a local audio file or better, an URL to that audio file.
Here is offical docs.

Decrypt a video part by part, and stream it through video player

Ok, I have a video encrypted through AES, stored in the internal memory of an Android powered device. What i want is that the video should only be played through an android app.
It would be appreciated if that application would decrypt the video part by part, store it in a virtual memory, and then stream it.
My question:
Is it possible to decrypt it part by part and stream?
If Yes, what would be the basic process?
If No, (nothing is impossible to code)
To make it happen, do i need to design my own video player android app, or can i use some existing app to work inside my app?
This subject is already treated in many questions.
For instance, look at How to play an encrypted video file in Android

Android IMEI binding with music file

Is there any possibility to develop an application that binds the IMEI with the music file and should not play that music file if IMEI is not registered.
The core idea is to protect the licensed file from transferring to other devices.
If you're using popular file formats like MP3, WAV etc, then any such protection you implement will only work in your app. The user will still be able to transfer the music file and play it using another music player.
However, you could develop a custom format that stores the IMEI as a part of the file (though you should store a hash of it, instead of the raw number, both for security and privacy reasons). This format will have to be structured in a way that no media player but yours can read the data from it. Naturally, you'll have to develop a parser for this format as well, as Android's built in media classes won't be able to play this.
Also, keep in mind that there are many Android devices that don't have an IMEI, so you might want to go with Bluetooth/WiFi MAC addresses. Also, your users may switch devices, and all of a sudden their music won't play anymore.

Android: redirect audio to file?

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?

Categories

Resources