Piasy / RxAndroidAudio

Maybe the most robust Android Audio encapsulation library, with partial Rx support.
http://blog.piasy.com/2016/02/24/Robust-Android-Audio-encapsulation/
MIT License
1.57k stars 235 forks source link

Can't use android.speech.SpeechRecognizer #62

Closed LunevNF closed 5 years ago

LunevNF commented 5 years ago

Hi. Why I cannot use android.speech.SpeechRecognizer (speech to text), when your recorder in status "recording"? I always get error fro, recognizer (#2, internet error). When stop record from micro using your lib, android.speech.SpeechRecognizer works fine. I trying to call method for run record (your lib) at another thread, but have the same error (2).

Sorry for my russian english.

LunevNF commented 5 years ago

Now, a think will be better to use stream (break recording and resume appending data to file), but after stop recording (using stream) I cannot play file via standart player. Make streaming like in example. Maybe need to set up params like bitrate?

Piasy commented 5 years ago

Streaming mode record data in raw PCM format, it can't be played by MediaPlayer, but it can be played by AudioTrack.

As for speech recognizer, I have no idea about it :(

LunevNF commented 5 years ago

@Piasy thanks for answer. Speech recognizer not working because only one client can use micro :(

LunevNF commented 5 years ago

Problem solved (when cannot to play pcm) - just convert to *.wav. Thanks for your lib