Google Speech to Text not working with large files - java

I am trying to convert an audio file into text using Google speech api. If audio is 30 sec or less its working fine, but when audio file is longer then 30 seconds then its not converting audio file into text.
please help me, what should i do?

You should use asynchronous speech recognition, and also upload the audio file to Google Cloud Storage.
Here the audio limit of Speech API

Related

How convert video to mp4 before upload to Google Storage?

Currently, I have an API which uploads files to Google Storage. If user uploads video it should be converted to mp4. I took a look at FFMEPG and Java wrapper around the FFmpeg , but I need to convert video directly from InputStream without writing into a disk. Is there any solution to convert InputStream into mp4?

Google Streaming Speech Recognition on an Audio Stream Java - Example App

I need do following with my web app.
1.Stream audio from webpage & submit to google cloud speech API & get the result. For that I want to know following?
1.how can i get the audio stream from webpage (access microphone) & submit to
speech API by using web socket or javasdk.
There is a sample for streaming api in java sdk samples but it loading file
from local files. Not real time reading from microphone.
2.How can i do text-to-speech using google cloud API.
Any help would be appreciated.
Thanks,
Pradeep

Android - convert audio to .mp3

I am trying to record audio ( using MediaRecorder ) and send it to a server in .mp3 format.
I have checked the web for solutions to converting any of the audio file formats received from MediaRecorder to .mp3 format, but I could not find any adequate solution ( also tried tritonus, but did not manage to use it ).
Please, can you give me a code sample or a link to a tutorial that can show me how to convert audio to .mp3 on the Android platform using standard Java code ( not C + NDK or anything ).
This is a show stopper for me, so I would really appreciate your help.
Thank you,
Sabin

Video converting into mp3 on Java, Android

I need to convert mp4/flv files info mp3 in my Android application, but I don't know C/C++ and Android NDK. Do you know libraries/methods for easy converting on Java? Thank you for anyway.
Your question is how to extract audio from MP4/ FLV files and save as mp3 file. Right ?
Then, very sorry, Android SDK does not provide any API for transformating or track extraction.
Also using available media framework to achieve the same is also not trivial (and even if you do, you will lose portability).
What I would suggest is to use your MP4 & FLV Parser to extract audio track, do transcoding (if audio track is non-mp3), and save the transcoded (if audio track extracted is mp3, then extracted data) data.
Or you can port FFMPEG code base and use the same. This again may be overkill for your small task.
Suppose you just want to extract mp3 track from MP4, then you understand the native mp4 parser and use the APIs for extraction. You may have to replicate some code from stagefright / opencore.
Shash
it's probably irrelevant for you anymore but if some one still need a mp4 to mp3 parser here's an api that can do the job

How to encode the real time audio?

I am on creating voice report. The user has to submit his voice report and it should simultaneously encode the audio data using Vorbis encoder. Its working fine but
encoding will start after the recording is over.
But I should have to employ the Vorbis encoder on the fly. Please share any sample code it would be much helpful.
Be more specific about how you record the audio. Do you just get the wav file or you get chunks of data? If latter, why don't you just feed it to the encoder in real time?

Categories

Resources